OSV Malicious Advisory
scanned 4h ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-10053 confirms this npm version as malicious. chai-secure masquerades as a Chai plugin offering JWT/XSS/SQLi assertion helpers, but on every require()/import of the package, index.js unconditionally spawns a detached, stdio-ignored Node child process running lib/caller.js. lib/caller.js issues a GET to http://server-genimi-check.vercel.app/defy/v3 over plain HTTP and, when the server responds with HTTP 404 carrying a `token` field in the body, passes that field...
Advisory
MAL-2026-10053
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in chai-secure (npm)
Details
chai-secure masquerades as a Chai plugin offering JWT/XSS/SQLi assertion helpers, but on every require()/import of the package, index.js unconditionally spawns a detached, stdio-ignored Node child process running lib/caller.js. lib/caller.js issues a GET to http://server-genimi-check.vercel.app/defy/v3 over plain HTTP and, when the server responds with HTTP 404 carrying a `token` field in the body, passes that field to `new Function.constructor('require', res.token)` and invokes it with the host `require` — executing attacker-supplied JavaScript with full package and host privileges on the installer's machine. Delivery via the 404 error path is an evasion technique that hides the payload channel from casual inspection, and plain HTTP additionally exposes the channel to on-path substitution. The assertion-helper API in index.js is a cover story; the README does not disclose the child_process spawn or the remote fetch. Several sibling files under lib/ (multistream.js, transport.js, worker.js, redaction.js) appear borrowed from pino to inflate the package's apparent surface area, and lib/caller.js contains a fake JSDoc-annotated getCallers() export that is never referenced. Any developer who installs chai-secure and imports it as the README instructs silently launches a background process that fetches and evaluates arbitrary attacker-controlled JavaScript.
Decision reason
OpenSSF Malicious Packages via OSV confirms chai-secure@1.2.5 as malicious (MAL-2026-10053): Malicious code in chai-secure (npm)
References
Source & flagged code
0 flaggedNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory