NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

chai-as-stringifynpm

Advisory published Updated

chai-as-stringify is a confirmed malicious npm package (MAL-2026-11032) that typosquats a legitimate package to trick installs (malicious versions 7.0.1, 7.0.2). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in chai-as-stringify (npm)

MAL-2026-11032
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall chai-as-stringify

What this malware does

[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.

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.

Malicious versions

2 flagged
7.0.17.0.2

Indicators of compromise (SHA-256)

06bb8071b2894038268bb513310437eed2c6ffc3aa534c8fae8b8273d7f56a9d
1fd6c5d195eb4ada8b488b79a07e672fa6b2c093e0d50218ff824e90355aa718
77eb9f214b2dc10f13ecfd3239542bc27fb35bdd5d0a645b41b398d8a4a3965d

Detection & response playbook

Typosquat
  1. Find it

    Search your lockfiles and build artifacts for chai-as-stringify (2 malicious versions).

  2. If you installed it — respond

    chai-as-stringify is a typosquat — you almost certainly intended a legitimately-named package. Remove chai-as-stringify, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.

  3. Did it already run?

    If chai-as-stringify was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. chai-as-stringify on npm has been identified as a malicious package (versions 7.0.1, 7.0.2 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

GHSA-vh7h-h87g-qv6xIN-MAL-2026-011205IN-MAL-2026-011203

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks chai-as-stringify-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

chai-as-stringify (npm) malicious package — MAL-2026-11032 | O3 Security