Advisory

MAL-2026-10053

Also known as: None

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in chai-secure (npm)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (4253b6520b80bd3c3ee724b9766c67a3a2d7abe074ee57e15d5b9b270bf74f55)
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.

Severity

Not rated by the source.

Dates

Published
2026-07-09 15:31 UTC
Modified
2026-07-09 16:31 UTC

Affected packages and fixes

chai-secure

npm · All systems

Affected

  • Versions: 1.2.3, 1.2.5

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences