MAL-2026-10621

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-hardened/MAL-2026-10621.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-10621
Published
2026-07-14T20:33:37Z
Modified
2026-07-14T21:04:39.632069128Z
Summary
Malicious code in chai-as-hardened (npm)
Details

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

Source: amazon-inspector (20c6afe564cf46f02258e635c1b08a802cd4f9b949e098710f44544cdbb86dfd)

On require, index.js spawns a detached Node child process running lib/initializeCaller.js. That script base64-decodes a hardcoded URL (tomato-brunhilda-40.tiiny.site/index.json) via atob, fetches the response with axios, and executes the response body through the Function constructor with require injected, granting the remote payload full Node capabilities on the installer's machine. The destination URL and request header are stored as base64 strings in a shadowed local process.env object to hide the target from static review. Package metadata is a cover story: the name resembles chai-as-promised, the description references vulnerability management, and exports mimic pino (module.exports.pino = middleware) with keywords 'logger', 'stream', 'json' to attract developers into installing and requiring it, at which point the remote-execution chain fires.

Database specific
{
    "malicious-packages-origins": [
        {
            "sha256": "20c6afe564cf46f02258e635c1b08a802cd4f9b949e098710f44544cdbb86dfd",
            "modified_time": "2026-07-14T20:33:37Z",
            "versions": [
                "7.0.9"
            ],
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-010565",
            "import_time": "2026-07-14T20:52:50.166593978Z"
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-hardened

Package

Affected ranges

Affected versions

7.*
7.0.9

Database specific

indicators
{
    "evidence_files": [
        {
            "sha256": "23436f977c9bbe6d302f0f94e191b3dfd938e5a0417ec098d38b60b0ed0cb14f",
            "tlsh": "9511c08e61fc200c046512e6b62f18126021e8673d86d5e47acc835b1f9567f7d936df",
            "path": "lib/initializeCaller.js"
        },
        {
            "sha256": "268ea0d85025358badbfd13a73ac39158b2ed87d034cdee89cc9d81ef195120d",
            "tlsh": "f5019c20ce788e2300ed25824c2a0643b6718c135928fc1932d7512c0f9d5bf05bf21d",
            "path": "package.json"
        }
    ],
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-C7V9ZEAl1DcziuiIwEuHYiDCFKB8qVWiAQ6gYQaFigSChPsHyz7E84mU94nQq3oi79Rx7e1/jvJBqK46/S6K2g==",
                "sha1": "eed49d4dfce8a1fa69014ecc0cb92323f82ab91c"
            },
            "filename": "chai-as-hardened-7.0.9.tgz"
        }
    ]
}
cwes
[
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-hardened/MAL-2026-10621.json"