Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    MAL-2026-18637 (GHSA-33JQ-J4X3-75PC)

    Vulnerability from ossf_malicious_packages – Published: 2026-11-04 18:02 – Updated: 2026-11-13 03:37 – Source website
    Malicious package
    Summary
    Malicious code in mock-datas-lib (npm)
    Affected package
    Ecosystem Package Versions
    npm mock-datas-lib
    Affected: All versions (semver)
    1.0.1
    Details
    Amazon Inspector IN-MAL-2026-022714 Reported 2026-11-13 03:36

    Package advertised as a mock-data generator ships an obfuscated loader in index.js and an encoded payload in database.js disguised as a product catalog. The exported getTransactions API invokes load_transaction_data, which iterates records in database.js, applies a Caesar-shift transform (keyed on the caller's count argument) to each record's base64 mark field, concatenates and base64-decodes the result, then passes the decoded source to the Function constructor with Buffer, require, and process bound as arguments and immediately invokes it. The Function constructor is obtained indirectly via globalThis.constructor.constructor, and the identifiers setTimeout, new Function, Buffer, require, process, try, catch, and clearTimeout are reconstructed by index from a split-token string array (_0x1a2b / _str) to defeat static analysis for Function(/eval(. The declared runtime dependencies python-shell (shell command execution) and axios (HTTP) are not referenced from the readable source and are only reachable from the decoded blob, consistent with hidden shell execution and network I/O against the installer. The data-file cover story, indirect Function acquisition, split-token identifier reconstruction, and unused shell/HTTP dependencies together form a supply-chain dropper that executes attacker-controlled code on any consumer that calls the library's documented API.

    GitHub Advisory Database GHSA-33jq-j4x3-75pc Reported 2026-11-04 18:03

    Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

    Indicators
    Type Indicator Hashes
    Evidence file index.js
    sha256 c0a1a7e54e1c759e62e48cfa835d79494163da3b37b30c1bd55c5875d9dd24f0
    tlsh 0ef10f6839f930248857b07c67eb9449612de0576e9a6ca87f4d83101f7d13ce1f6ba8
    Evidence file database.js
    sha256 f8c654c820c8c17aebf4d2e571bfb44c57bf7e8905809370ac5ff183eaf3fd8a
    tlsh f7335e3acb780c5b51795a606af50a4af280472f17a06e877fbdd54c8fb1c4b8049e3b
    CWE
    • CWE-506 - Embedded Malicious Code
    Credits
    Amazon Inspector inspector-research@amazon.com

    {
      "affected": [
        {
          "database_specific": {
            "cwes": [
              {
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature.",
                "name": "Embedded Malicious Code"
              },
              {
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature.",
                "name": "Embedded Malicious Code"
              }
            ],
            "indicators": {
              "evidence_files": [
                {
                  "path": "index.js",
                  "sha256": "c0a1a7e54e1c759e62e48cfa835d79494163da3b37b30c1bd55c5875d9dd24f0",
                  "tlsh": "0ef10f6839f930248857b07c67eb9449612de0576e9a6ca87f4d83101f7d13ce1f6ba8"
                },
                {
                  "path": "database.js",
                  "sha256": "f8c654c820c8c17aebf4d2e571bfb44c57bf7e8905809370ac5ff183eaf3fd8a",
                  "tlsh": "f7335e3acb780c5b51795a606af50a4af280472f17a06e877fbdd54c8fb1c4b8049e3b"
                }
              ]
            }
          },
          "package": {
            "ecosystem": "npm",
            "name": "mock-datas-lib"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                }
              ],
              "type": "SEMVER"
            }
          ],
          "versions": [
            "1.0.1"
          ]
        }
      ],
      "aliases": [
        "GHSA-33jq-j4x3-75pc"
      ],
      "credits": [
        {
          "contact": [
            "inspector-research@amazon.com"
          ],
          "name": "Amazon Inspector",
          "type": "FINDER"
        }
      ],
      "database_specific": {
        "malicious-packages-origins": [
          {
            "id": "GHSA-33jq-j4x3-75pc",
            "import_time": "2026-11-04T18:20:09.197932681Z",
            "modified_time": "2026-11-04T18:03:05Z",
            "ranges": [
              {
                "events": [
                  {
                    "introduced": "0"
                  }
                ],
                "type": "SEMVER"
              }
            ],
            "sha256": "7795c5ecb71c77fcb6d7630bfb136c7edef41a13036dd6ae6ebb02dfe4b60618",
            "source": "ghsa-malware"
          },
          {
            "id": "IN-MAL-2026-022714",
            "import_time": "2026-11-13T03:36:36.329552186Z",
            "modified_time": "2026-11-13T03:36:07Z",
            "sha256": "acbce1629b1a23a1dd82a3143a008b18c8c944982c5a006e4e64d40bb283ac59",
            "source": "amazon-inspector",
            "versions": [
              "1.0.1"
            ]
          }
        ]
      },
      "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (acbce1629b1a23a1dd82a3143a008b18c8c944982c5a006e4e64d40bb283ac59)\nPackage advertised as a mock-data generator ships an obfuscated loader in index.js and an encoded payload in database.js disguised as a product catalog. The exported getTransactions API invokes load_transaction_data, which iterates records in database.js, applies a Caesar-shift transform (keyed on the caller\u0027s count argument) to each record\u0027s base64 `mark` field, concatenates and base64-decodes the result, then passes the decoded source to the Function constructor with Buffer, require, and process bound as arguments and immediately invokes it. The Function constructor is obtained indirectly via globalThis.constructor.constructor, and the identifiers setTimeout, new Function, Buffer, require, process, try, catch, and clearTimeout are reconstructed by index from a split-token string array (_0x1a2b / _str) to defeat static analysis for Function(/eval(. The declared runtime dependencies python-shell (shell command execution) and axios (HTTP) are not referenced from the readable source and are only reachable from the decoded blob, consistent with hidden shell execution and network I/O against the installer. The data-file cover story, indirect Function acquisition, split-token identifier reconstruction, and unused shell/HTTP dependencies together form a supply-chain dropper that executes attacker-controlled code on any consumer that calls the library\u0027s documented API.\n\n## Source: ghsa-malware (7795c5ecb71c77fcb6d7630bfb136c7edef41a13036dd6ae6ebb02dfe4b60618)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n",
      "id": "MAL-2026-18637",
      "modified": "2026-11-13T03:37:49.868568825Z",
      "published": "2026-11-04T18:02:01Z",
      "references": [
        {
          "type": "ADVISORY",
          "url": "https://github.com/advisories/GHSA-33jq-j4x3-75pc"
        },
        {
          "type": "PACKAGE",
          "url": "https://www.npmjs.com/package/mock-datas-lib/v/1.0.1"
        }
      ],
      "schema_version": "1.7.4",
      "summary": "Malicious code in mock-datas-lib (npm)"
    }