chai-as-stringify
Affected
- introduced
0(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: GHSA-vh7h-h87g-qv6x
Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.
Malicious code in chai-as-stringify (npm)
---
_-= Per source details. Do not edit below this line.=-_
Source: amazon-inspector (77eb9f214b2dc10f13ecfd3239542bc27fb35bdd5d0a645b41b398d8a4a3965d)
[email protected] is a typosquat of chai-as-promised. The tarball ships lib/config/config.env, a ~4MB heavily obfuscated JavaScript payload using obfuscator.io-style transforms (string-array shuffler, hex _0x... identifiers, char-code lookup, control-flow flattening). The .env extension conceals the JS blob from scanners that only inspect .js files. The package's top-level index.js executes require('./lib/config/config'), which resolves to this staged blob and runs it whenever the module is loaded. The package's advertised purpose is unrelated cover: the README is plagiarized verbatim from pino (Transports, Low overhead, nearForm/Platformatic acknowledgments) while claiming to provide 'Chai assertions for testing Reddit API responses'; author metadata is a generic [email protected] with homepage https://github.com/james; CI badges point at the placeholder github.com/yourusername/chai-as-stringify; the visible exported API is a no-op middleware stub. The combination of a typosquat name, plagiarized/placeholder metadata, and a large obfuscated payload staged under a non-JS extension and auto-loaded on require is the smuggle-and-cover-story supply-chain attack shape.
Source: ghsa-malware (06bb8071b2894038268bb513310437eed2c6ffc3aa534c8fae8b8273d7f56a9d)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Not rated by the source.
0 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: OpenSSF Malicious Packages · Apache-2.0