MAL-2026-13942

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-reformed/MAL-2026-13942.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13942
Published
2026-08-13T17:21:22Z
Modified
2026-08-13T17:30:13.474909935Z
Summary
Malicious code in chai-as-reformed (npm)
Details

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

Source: amazon-inspector (ae73388f2a877d421e53b37bdd36496a8048149ffe2e64a975e87c705f8b0e45)

The package impersonates chai-as-promised and copies its README from pino, but its exported middleware spawns a detached node lib/caller.js process. caller.js base64-decodes a hardcoded jsonstorage.net URL (concealed together with an x-secret-key header name/value as base64 literals in a synthetic process.env object decoded with atob), fetches the JSON response, and passes its cookie field to new Function.constructor("require", s)(require), executing attacker-controlled JavaScript in the host Node.js process with access to require. The remote payload is mutable and can be changed by the operator of the storage URL at any time.

Database specific
{
    "malicious-packages-origins": [
        {
            "import_time": "2026-08-13T17:24:46.14280158Z",
            "id": "IN-MAL-2026-017655",
            "sha256": "ae73388f2a877d421e53b37bdd36496a8048149ffe2e64a975e87c705f8b0e45",
            "modified_time": "2026-08-13T17:21:22Z",
            "source": "amazon-inspector",
            "versions": [
                "1.2.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chai-as-reformed

Package

Affected ranges

Affected versions

1.*
1.2.0

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-reformed/MAL-2026-13942.json"
indicators
{
    "evidence_files": [
        {
            "path": "lib/caller.js",
            "tlsh": "6e01efd934fd501c021111ea171fa032a010e4373882d6c8374cc7428fa66bd2e93aef",
            "sha256": "ffa61701ff61ebc0c6d64cf09f5bc37a74a91b03b716129b90271d758dc164b7"
        },
        {
            "path": "package.json",
            "tlsh": "1601cb61ceb88e7300dd31824c2a0243b6618c939928fd2932d7522c0f9daff11bf21d",
            "sha256": "48fca66f5f6f6d40d63602700d1c47d73b4b87c87749cd407d5360f3efd32b57"
        }
    ],
    "package_integrity": [
        {
            "filename": "chai-as-reformed-1.2.0.tgz",
            "hashes": {
                "sha512_sri": "sha512-ZbT0Y8d2WXmWE/ywW+kdxYXXSWPjTbLSSf8UA7TiUrCykvYoRg15ZQ3MsntA1wP3ILTbdfji+t8MOcl2ZG9cDg==",
                "sha1": "947b739a5f3ece43d4e56819e21eff2b28ce17ed"
            }
        }
    ]
}