{"id":"MAL-2026-6994","revision":"f4c3aabd15c14c0bad6d08c8a1478134","records":[{"revision":"f4c3aabd15c14c0bad6d08c8a1478134","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-6994","aliases":[],"title":"Malicious code in chai-presentation (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (1d078bac337fe2c1b76c757c29d286fc750be585db65f30f5d696038c2ea0d3a)\nOn require(), index.js issues an HTTPS GET to https://www.jsonkeeper.com/b/PC5CK and passes the response's `cookie` field to `new Function('require',...)`, immediately invoking it with the host's `require`. This gives whoever controls that jsonkeeper.com paste full Node.js execution privileges on the installer's machine the moment any consumer imports the package. A second staged loader is wired in parallel: index.js top-level spawns a detached, stdio-ignored Node child running lib/caller.js, which polls a URL built from config values and, on a 404 response, passes `error.response.data.token` to Function.constructor and executes it with `require`. lib/const.js additionally stores a base64 string under `DEV_API_KEY` that decodes to https://jsonkeeper.com/b/4NAKK — a second anonymous paste-host URL hidden from plain-string scanning. The package name presents as a chai plugin but the README describes an unrelated package (`chai-submission`), and declared dependencies (axios, request, sqlite3) are unrelated to chai assertions — an impersonation lure wrapping two import-time remote-eval channels.\n","state":0,"publishedAt":"2026-07-08T16:35:25+00:00","modifiedAt":"2026-07-09T16:31:54.1747805+00:00","affected":[{"ecosystem":"npm","name":"chai-presentation","ranges":[],"versions":["0.0.1","0.0.2","0.0.4","0.0.3"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-presentation/v/0.0.1","https://www.npmjs.com/package/chai-presentation/v/0.0.2","https://www.npmjs.com/package/chai-presentation/v/0.0.4","https://www.npmjs.com/package/chai-presentation/v/0.0.3"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-6994","license":"OSV · upstream source license applies","key":"osv:MAL-2026-6994","identifiers":["MAL-2026-6994"]},"retained":false,"historicalAffected":[]}],"coverage":[]}