Malicious code in chaienv (npm)
--- _-= 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.
MAL-2026-17321
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:MAL-2026-17321
chaienv
Source reference: /affected/0/package/name
- Affected versions
- 1.0.2
Source reference:
/affected/0/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"package": {
"name": "chaienv",
"purl": "pkg:npm/chaienv",
"ecosystem": "npm"
},
"versions": [
"1.0.2"
],
"database_specific": {
"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/chaienv/MAL-2026-17321.json",
"indicators": {
"evidence_files": [
{
"path": "lib/config.js",
"tlsh": "0e2683ca4a45d02389de26d3be067ad9e23b9d9ad4dc65c7c36cbd9c6cac447c1a0cd0",
"sha256": "ddf2efda031c3b87965a90be6f14265b4fb223352f5680ddd2b28e91258cc99b"
},
{
"path": "package.json",
"tlsh": "7811ce34c9385d6311dc75a16c5a8292627a4a434e08bd0d33e7802c0faee7f21ff65d",
"sha256": "796f68ed792d88a38862d658fefbd2c8feaf2d88c6a44cd302bd7782a7d343e4"
}
],
"package_integrity": [
{
"hashes": {
"sha1": "af8bd6974fe2e37a112a7185b3247544799f67b9",
"sha512_sri": "sha512-BqJzhDY/3jn4i3XQDRRBl4ToIrBGdWthL0XTiqjxBTuw8NeLdoNeOw90SwtPBsDER2FE67tvpi3JQ1juXauLbw=="
},
"filename": "chaienv-1.0.2.tgz"
}
]
}
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #36968 · Revision 1
- Added to Heist Feed
- Publisher date