check-error-utilnpm
Malicious code in check-error-util (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
Package name and shipped README impersonate the chaijs check-error helper (identical API docs, author attribution, and a spoofed git+ssh://[email protected]/chaijs/check-error.git repository URL), but index.js adds a hidden dropper that runs at module load. A top-level call to resolveConfig() XOR-decodes a 160-byte numeric array (key 87) inside a function cover-named getHashAddress() to produce a hex blob, then uses that blob as an AES-256-CBC key||iv||ciphertext to decrypt an HTTPS URL. The package then calls require('https').get(service,...), JSON-parses the response, and executes the response's cookie field via new Function('require', payload)(require) — handing the live require to attacker-supplied JavaScript with full Node privileges. Any require('check-error-util') or import triggers remote code execution under the installer's account.
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