params-valid-js@1.0.3
Malicious code in params-valid-js (npm)
Analysis
params-valid-js@1.0. The package copies the entire 'request' HTTP library as cover (README, request.js, lib/*.js) but injects a hidden implant: index.js spawns a detached child node process running lib/callers.js, which does an HTTP GET to a remote host and executes the response's Cookie field as arbitrary JavaScript via new Function.constructor("require", s). The callers.js file uses a locally-scoped 'process' constant that shadows the real process.env to evade static analysis. The detached spawn (child.unref()) prevents the installer from observing the child's failure. No lifecycle hooks are needed — the implant activates when the package is required as middleware.
- analyzed by
- Leitwacht
- first seen
- Jun 11, 2026, 06:01 PM
- analyzed
- Jun 11, 2026, 06:02 PM
Related advisories
- @genie-auth/config@99.9.1
- vite-tsconfig@1.1.2
- chalk-plus-ts@1.0.3
- bubblestring@1.1.4
- npm-doc-dev@1.0.9
- chalk-plus-js@7.0.4
- noon-contracts@1.0.0
- express-initial@12.1.7
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.