{"id":"MAL-2026-12540","revision":"78e37e2acd5e4f1696361d9bbc6189e1","records":[{"revision":"78e37e2acd5e4f1696361d9bbc6189e1","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-12540","aliases":[],"title":"Malicious code in chai-as-inspired (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bc4795830ed2849aaf2a6eaa488fbecc42a31c2d6d212fe34e635c16217e46ed)\nchai-as-inspired is a typosquat resembling chai/pino packages. Its middleware entrypoint (index.js) spawns a detached `node lib/caller.js` child on invocation. caller.js hides its network destination behind a fake `process.env` object whose values are base64 blobs; decoding yields the URL https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/f89e8264-86c2-4684-94da-c3f82d59370f and an `x-secret-key` header. The response's `cookie` field is passed to `new Function.constructor('require', s)(require)`, executing attacker-controlled JavaScript in a retry loop with the installer's `require` and full Node privileges. The remote content is hosted on a mutable, anonymous JSON-storage bucket and can be changed at any time by the operator. The base64 disguise of the endpoint and header keys, combined with the fetch-and-eval mechanism, establishes hostile intent.\n","state":0,"publishedAt":"2026-08-05T13:33:19+00:00","modifiedAt":"2026-09-01T11:31:00.898689+00:00","affected":[{"ecosystem":"npm","name":"chai-as-inspired","ranges":[],"versions":["2.2.4"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-inspired/v/2.2.4"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-12540","license":"OSV · upstream source license applies","key":"osv:MAL-2026-12540","identifiers":["MAL-2026-12540"]},"retained":false,"historicalAffected":[]}],"coverage":[]}