MAL-2026-5908

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chain-chai-test/MAL-2026-5908.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-5908
Published
2026-06-16T16:22:52Z
Modified
2026-06-16T18:16:51.781428360Z
Summary
Malicious code in chain-chai-test (npm)
Details

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

Source: amazon-inspector (4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00)

chain-chai-test@1.3.5 advertises itself as a pino-style logger (keywords fast/logger/stream/json, exported alias module.exports.pino = middleware, pino-pretty visual assets) but the exported middleware factory spawns a detached node lib/caller.js process. caller.js performs axios.get against https://jsonkeeper.com/b/EXSIF (with a base64-obfuscated sibling URL https://jsonkeeper.com/b/ZK45J in lib/const.js, decoded from aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1pLNDVK), reads .data.cookie from the response, and passes that string to new Function.constructor("require", s) invoked with the host process's require. That executes attacker-controlled JavaScript with full Node.js privileges in the consuming application. The fetch destination is an anonymous, mutable JSON-paste host, the URL is duplicated in obfuscated form to conceal the C2 endpoint, and the package name and exported API impersonate the legitimate pino logger to lure installers. Unrelated dependencies (request, sqlite3, parse-json) further indicate this is not a logger implementation.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-006795",
            "versions": [
                "1.3.5"
            ],
            "import_time": "2026-06-16T18:10:20.723525968Z",
            "modified_time": "2026-06-16T16:22:52Z",
            "sha256": "4287ff6637bb0d3109dcdc3082aece79d69deca2a3580ebf850ec1c13e8a3e00",
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / chain-chai-test

Package

Affected ranges

Affected versions

1.*
1.3.5

Database specific

indicators
{
    "package_integrity": [
        {
            "filename": "chain-chai-test-1.3.5.tgz",
            "hashes": {
                "sha512_sri": "sha512-jF7BMCPtFtNBlP/Fe7IJlgrMUhvAD5uL85XnTskMXBD+gBIGwM9o47yiR6z5oZ0ElEBWU4PQw4dKlAnXK0hmog==",
                "sha1": "4add4668a7eec67f97f4bce6b82988f158d9b89e"
            }
        }
    ],
    "evidence_files": [
        {
            "sha256": "c94c68398967a72596733d62b40d3b2df9490056a3b25bfd96333d0a88d84624",
            "tlsh": "e701cb8f30fd101c019122e66b1fe4327010e85b390ae4d4374c87521ffa5aeaa53ede",
            "path": "lib/caller.js"
        },
        {
            "sha256": "32e82853dd646aac388b78f868241267a5e6483d847df3d4c843f8100590d469",
            "tlsh": "30213f8175f111480658d9c8b569e5363ce3c4377207b9b0e9ecb7862bcf20c0272ad7",
            "path": "index.js"
        },
        {
            "sha256": "9879ffb0bf61edef7e9b90ddc5fac9770c514c0cdecd9a07b15e8a677e6f8f74",
            "tlsh": "8ac08c8351e4a89704301773610ca995f2a1d26f0c840b0331f594844a396a93840fbb",
            "path": "lib/const.js"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chain-chai-test/MAL-2026-5908.json"
cwes
[
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    }
]