MAL-2026-17321

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chaienv/MAL-2026-17321.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17321
Published
2026-09-30T04:09:36Z
Modified
2026-09-30T05:00:07Z
Summary
Malicious code in chaienv (npm)
Details

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

Source: amazon-inspector (cbb73465123d4e732dae815badc8950b40e9447463c1fca697551ab3aa00e020)

chaienv@1.0.2 is published as a small Chai environment helper, but its index.js unconditionally loads lib/config.js at require() time via const { config } = require('./lib/config'). lib/config.js is a 4,454,290-byte single-line module packed with obfuscator.io (RC4-decoded string array of roughly 26,000 entries), with no relation to the trivial no-op middleware the README advertises. The rest of lib/ ships verbatim pino internals (proto.js, multistream.js, levels.js, transport.js, worker.js, redaction.js, symbols.js) as decoys, the README CI badge and LICENSE point at github.com/pinojs/pino, and package.json bugs.url is jsonspack.com — none of which match the stated Chai-plugin purpose. Any consumer that imports this package executes the opaque 4.4MB blob on load; the package impersonates an unrelated well-known project's source tree to normalize the obfuscated sibling and bypass casual review.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-020801",
            "import_time":  "2026-09-30T04:46:52.221617361Z",
            "modified_time":  "2026-09-30T04:09:36Z",
            "sha256":  "cbb73465123d4e732dae815badc8950b40e9447463c1fca697551ab3aa00e020",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.2"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / chaienv

Package

Affected ranges

Affected versions

1.*
1.0.2

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "lib/config.js",
            "sha256":  "ddf2efda031c3b87965a90be6f14265b4fb223352f5680ddd2b28e91258cc99b",
            "tlsh":  "0e2683ca4a45d02389de26d3be067ad9e23b9d9ad4dc65c7c36cbd9c6cac447c1a0cd0"
        },
        {
            "path":  "package.json",
            "sha256":  "796f68ed792d88a38862d658fefbd2c8feaf2d88c6a44cd302bd7782a7d343e4",
            "tlsh":  "7811ce34c9385d6311dc75a16c5a8292627a4a434e08bd0d33e7802c0faee7f21ff65d"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "chaienv-1.0.2.tgz",
            "hashes":  {
                "sha1":  "af8bd6974fe2e37a112a7185b3247544799f67b9",
                "sha512_sri":  "sha512-BqJzhDY/3jn4i3XQDRRBl4ToIrBGdWthL0XTiqjxBTuw8NeLdoNeOw90SwtPBsDER2FE67tvpi3JQ1juXauLbw=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chaienv/MAL-2026-17321.json"