MAL-2026-18637

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mock-datas-lib/MAL-2026-18637.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-18637
Aliases
  • GHSA-33jq-j4x3-75pc
Published
2026-11-04T18:02:01Z
Modified
2026-11-13T03:45:14Z
Summary
Malicious code in mock-datas-lib (npm)
Details

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

Source: amazon-inspector (acbce1629b1a23a1dd82a3143a008b18c8c944982c5a006e4e64d40bb283ac59)

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.

Source: ghsa-malware (7795c5ecb71c77fcb6d7630bfb136c7edef41a13036dd6ae6ebb02dfe4b60618)

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.

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"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / mock-datas-lib

Package

Name
mock-datas-lib
View open source insights on deps.dev
Purl
pkg:npm/mock-datas-lib

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.1

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"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mock-datas-lib/MAL-2026-18637.json"