VYPR

npm · Malicious package advisory

Malware

chaienv

GHSA-3vpx-vp9c-229p

Malicious code in chaienv (npm)

Details

**Severity:** Critical

**Affected versions:** `= 1.0.2`

## Source: amazon-inspector (cbb73465123d4e732dae815badc8950b40e9447463c1fca697551ab3aa00e020)
[email protected] 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.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/c19ea3a01baa8c935920324eacf35bf5e92654fb/osv/malicious/npm/chaienv/MAL-2026-17321.json))

**References:**
- https://github.com/ossf/malicious-packages/blob/c19ea3a01baa8c935920324eacf35bf5e92654fb/osv/malicious/npm/chaienv/MAL-2026-17321.json
- https://www.npmjs.com/package/chaienv/v/1.0.2
- https://github.com/advisories/GHSA-3vpx-vp9c-229p

Compromised versions (1)

  • = 1.0.2

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.