MAL-2026-12349

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-assertions-plus/MAL-2026-12349.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-12349
Published
2026-08-05T12:55:26Z
Modified
2026-08-05T13:35:03.238686013Z
Summary
Malicious code in chai-assertions-plus (npm)
Details

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

Source: amazon-inspector (80a83cd9353779d12538e8c6b06276178f6f0c246abd7d5148ce805536cbf57f)

The package is published as a Chai assertions extension, but the shipped code in index.js and lib/ is unrelated Pino logger source used as filler. Requiring the package loads lib/initializeCaller.js, which runs a top-level IIFE that shadows the global process object with a fake object whose env fields hold base64-encoded strings. At runtime those strings are atob-decoded to reconstruct a destination URL (https://amethyst-lorrin-26.tiiny.site/index.json) and an HTTP header name/value pair, an axios GET is issued to that URL, and the returned response body is passed into new Function("require", response) and invoked with the real require. This gives whoever controls the tiiny.site subdomain arbitrary code execution on the installer's machine with the package's require capability, on every import of the module. The name/description mismatch and the endpoint/header obfuscation indicate deliberate deception rather than a misconfiguration.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-014811",
            "modified_time": "2026-08-05T12:55:26Z",
            "import_time": "2026-08-05T13:08:48.252470396Z",
            "source": "amazon-inspector",
            "sha256": "76b8da3d8783a9e8a196f985c5cdda0bf36a704f0eb4a00a849688e7fb7475f7",
            "versions": [
                "6.0.6"
            ]
        },
        {
            "id": "IN-MAL-2026-014828",
            "modified_time": "2026-08-05T12:58:06Z",
            "import_time": "2026-08-05T13:08:49.657499898Z",
            "source": "amazon-inspector",
            "sha256": "80a83cd9353779d12538e8c6b06276178f6f0c246abd7d5148ce805536cbf57f",
            "versions": [
                "6.0.5"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chai-assertions-plus

Package

Name
chai-assertions-plus
View open source insights on deps.dev
Purl
pkg:npm/chai-assertions-plus

Affected ranges

Affected versions

6.*
6.0.5
6.0.6

Database specific

cwes
[
    {
        "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",
        "cweId": "CWE-506"
    }
]
indicators
{
    "package_integrity": [
        {
            "filename": "chai-assertions-plus-6.0.6.tgz",
            "hashes": {
                "sha512_sri": "sha512-fDl7iequE9FiXRA3ac1Czrl3DuYp/btArQ6Z/tb8a0xMPEFLPsKxTzpRUEhadsr6yD3JNEgBZOefpqnIyh9adg==",
                "sha1": "d1fbb199d7ee84ba2689140f45fceb633152ea5e"
            }
        }
    ],
    "evidence_files": [
        {
            "path": "lib/initializeCaller.js",
            "tlsh": "5a11ef8d61fd200c016612e6b72f18116022e42b3d46d4e4badc83471f9663fbd53adf",
            "sha256": "4a89cb402be124207aa05c84fccbb5fc89b6dcb1d993e07f25d693c4c356405a"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-assertions-plus/MAL-2026-12349.json"