mddrivernpm
Malicious code in mddriver (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
On require('mddriver'), an IIFE in index.js invokes loadTokenData(), which fetches https://www.jsonkeeper.com/b/C4H0M (stored base64-encoded as "aHR0cHM6Ly93d3cuanNvbmtlZXBlci5jb20vYi9DNEgwTQ==" and decoded with atob), parses the JSON response, and passes the.content field to a Function-constructor evaluator (new (Function.contructor)(...)) for execution. The paste-style host is anonymous and the fetched content is fully mutable — any consumer that imports this package executes whatever JavaScript the operator of that paste serves at that moment, with no signature, hash, or pinning. The package metadata advertises 'MongoDB connection driver' but the shipped index.js is a verbatim copy of Node's built-in path module with the dropper appended; the name 'mddriver' and the misleading description are consistent with a typosquat targeting developers searching for mongodb / mongoose drivers.
Malicious versions
Indicators of compromise (SHA-256)
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Scan your dependencies
O3 Security blocks malicious packages like this at install time and in CI.
Supply-chain protection