{"id":"MAL-2026-10042","revision":"72ed66cff97945b7b8a6e898f47e7577","records":[{"revision":"72ed66cff97945b7b8a6e898f47e7577","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10042","aliases":[],"title":"Malicious code in chai-as-disarmed (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b6d396201a3dd1706d97f7daa880f254c920bbea65ea6b013ed48f78a21a0241)\nPackage name typosquats `chai-as-promised` while the README and keywords impersonate `pino` to bait installs. On `require()`, index.js detach-spawns `lib/caller.js`, which decodes a base64-stored URL to `https://api.jsonstorage.net/v1/json/2ef8c758-.../a179ea35-...`, issues an authenticated GET (header name and value are also base64-hidden inside a local object that shadows `process.env`), and executes the returned `.cookie` string via `new Function.constructor('require', s)(require)` — granting the remote operator arbitrary code execution in the installer's Node.js process with full `require` access. The fetch retries up to 5 times. The remote content sits in a mutable third-party JSON store, so the executed payload can be swapped at any time without republishing the package. None of this behavior corresponds to the advertised chai/pino functionality.\n","state":0,"publishedAt":"2026-07-09T15:31:23+00:00","modifiedAt":"2026-07-09T16:31:53.0929049+00:00","affected":[{"ecosystem":"npm","name":"chai-as-disarmed","ranges":[],"versions":["3.2.3"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-disarmed/v/3.2.3"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10042","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10042","identifiers":["MAL-2026-10042"]},"retained":false,"historicalAffected":[]}],"coverage":[]}