MAL-2026-19143
Vulnerability from ossf_malicious_packages
Published
2026-11-11 21:02
Modified
2026-11-20 13:19
Summary
Malicious code in mock-data-sdk (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (f6f3367976e89b052e26e44ddc41d0352391f24336e41a8d41687a0d4c7010e0)

The package presents itself as a mock-data generator but hides a base64-encoded JavaScript payload across the mark fields of data/products_.js. The library entrypoint (index.js) concatenates those fields, decodes the result with Buffer.from(..., 'base64').toString('utf-8'), and executes it via the Function() constructor with Buffer, require, and process passed in as arguments. The identifiers 'Buffer', 'require', 'process', and 'new Function' are reconstructed at runtime from an XOR-obfuscated table keyed by a derived 4-byte seed, which conceals the eval sink from string-based scanners. The exported getTransactions() API triggers this execution on every call. The decoded payload loads python-shell and https, writes a Python script to /tmp/targets, and recursively walks the filesystem (pathlib.Path(root).rglob('')) for file names containing 'password', 'wallet', 'seed', 'privatekey', or '.env'. The advertised purpose (mock data) has no legitimate need to enumerate credential-, wallet-, and dotenv-shaped files on the installer's host or to run arbitrary code reconstructed from pseudo-data files.

Source: ghsa-malware (31ab62d9fa070d7e1f0ee2b3e7222a6d071c7f3a75a9b3cbb61981adcc5aabe8)

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.

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.

{
  "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": "bcd159fca68ccb2d4b920cef97c36e3dfdfc417c594c7716ccbd59ad7915454b",
              "tlsh": "c1d100ac3bfc2028881bb26826db4449652dd0571e9a7ce87f4cc2417f2d17cd2f6b58"
            },
            {
              "path": "data/products_1.js",
              "sha256": "98a6ac1cc9d8420b07c2f269846f97d22c606026b3dca05a04518c3029df16b0",
              "tlsh": "54522e79cb780c9761091ca05af6094a7290475b0fea3e467f4dd54c8f9cc5f84ba62f"
            }
          ],
          "package_integrity": [
            {
              "filename": "mock-data-sdk-1.0.1.tgz",
              "hashes": {
                "sha1": "343aa32b625dbdb9de897afe891dde4ba61e8e89",
                "sha512_sri": "sha512-gWOcc8igVHl+OKsWDVpnIybv1WXhcwHgSgp0wcdr6JrBNASYSWoS2omuDO8S01Od3LWvAhtQ3EzQpxX8m1pFAg=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "mock-data-sdk"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "1.0.1"
      ]
    }
  ],
  "aliases": [
    "GHSA-6r85-j4v5-27rf"
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-022607",
        "import_time": "2026-11-11T21:05:23.50413818Z",
        "modified_time": "2026-11-11T21:02:24Z",
        "sha256": "f6f3367976e89b052e26e44ddc41d0352391f24336e41a8d41687a0d4c7010e0",
        "source": "amazon-inspector",
        "versions": [
          "1.0.1"
        ]
      },
      {
        "id": "GHSA-6r85-j4v5-27rf",
        "import_time": "2026-11-20T13:18:11.285165266Z",
        "modified_time": "2026-11-20T12:41:46Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "31ab62d9fa070d7e1f0ee2b3e7222a6d071c7f3a75a9b3cbb61981adcc5aabe8",
        "source": "ghsa-malware"
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (f6f3367976e89b052e26e44ddc41d0352391f24336e41a8d41687a0d4c7010e0)\nThe package presents itself as a mock-data generator but hides a base64-encoded JavaScript payload across the `mark` fields of data/products_*.js. The library entrypoint (index.js) concatenates those fields, decodes the result with Buffer.from(..., \u0027base64\u0027).toString(\u0027utf-8\u0027), and executes it via the Function() constructor with Buffer, require, and process passed in as arguments. The identifiers \u0027Buffer\u0027, \u0027require\u0027, \u0027process\u0027, and \u0027new Function\u0027 are reconstructed at runtime from an XOR-obfuscated table keyed by a derived 4-byte seed, which conceals the eval sink from string-based scanners. The exported getTransactions() API triggers this execution on every call. The decoded payload loads python-shell and https, writes a Python script to /tmp/targets, and recursively walks the filesystem (pathlib.Path(root).rglob(\u0027*\u0027)) for file names containing \u0027password\u0027, \u0027wallet\u0027, \u0027seed\u0027, \u0027privatekey\u0027, or \u0027.env\u0027. The advertised purpose (mock data) has no legitimate need to enumerate credential-, wallet-, and dotenv-shaped files on the installer\u0027s host or to run arbitrary code reconstructed from pseudo-data files.\n\n## Source: ghsa-malware (31ab62d9fa070d7e1f0ee2b3e7222a6d071c7f3a75a9b3cbb61981adcc5aabe8)\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-19143",
  "modified": "2026-11-20T13:19:28.322700621Z",
  "published": "2026-11-11T21:02:24Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/mock-data-sdk/v/1.0.1"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-6r85-j4v5-27rf"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in mock-data-sdk (npm)"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…