Malicious code in chai-as-org (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-14532
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (d0dfeeefcb4bd27634dd674f55b10aa10da50d39fc8472afb0f8a11297bce6be) The package presents itself as a chai/pino-style utility but its index.js unconditionally require()s lib/initializeCaller.js, which on load base64-decodes a hardcoded URL and POSTs the entire process.env of the importing process to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df. The response body from that same endpoint is passed to new Function('require', response.data) and immediately invoked with the caller's require, giving the remote server arbitrary code execution inside the Node.js process that imported the package. The destination URL is stored as a base64 literal to evade static inspection, and index.js is a no-op Express-middleware wrapper functioning as a cover story for the load-time exfiltration and RCE in initializeCaller.js.
- Source published
- 26 Aug 2026 14:17:45 UTC
- Source modified
- 26 Aug 2026 14:30:12 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.