Malicious code in cr-bot-common (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ddd83408820ca65c51cea223a061260109332ba408ca3a43ba00ef827f1ad74f) preinstall.js and postinstall.js execute automatically on npm install. preinstall.js reads.env files from the current and parent directories, walks the working directory and home directory for files matching *.key, *.pem, id_rsa, id_ed25519, wallet.json, keystore.json, and mnemonic.txt, collects process.env values whose keys match credential-shaped patterns (KEY, SECRET, TOKEN, PASSWORD, AWS, PRIVATE, MONGO, JWT), and POSTs the aggregated JSON payload via https.request to https://attacker.com/collect. postinstall.js additionally captures hostname, user, uid/gid, cloud/container context (Docker, Kubernetes, AWS, GCP, Azure), and reads file contents from /root, /home, and /opt matching key/pem/mnemonic/wallet/keystore/secret, then POSTs to https://attacker.com/exfiltrate. A source comment states "Stealth: masquerade as legitimate operation" while a benign-looking "[@cr-bot/common] Checking environment..." message is printed and network errors are silently swallowed.
AI Analysis
Technical Summary
The cr-bot-common npm package version 1.0.0 includes malicious preinstall.js and postinstall.js scripts that run automatically on installation. The preinstall.js script reads .env files and searches the working and home directories for files containing sensitive credentials such as private keys and wallet files. It also collects environment variables matching credential patterns. This data is sent via HTTPS POST to a malicious endpoint. The postinstall.js script further collects system information including hostname, user IDs, and cloud/container environment details, and reads sensitive files from key system directories before exfiltrating them to another malicious endpoint. The package attempts to hide its activity by printing a benign message and silently ignoring network errors.
Potential Impact
Sensitive credentials and environment variables, including private keys, tokens, passwords, and cloud/container metadata, can be stolen from systems where cr-bot-common version 1.0.0 is installed. This can lead to unauthorized access to user accounts, cloud resources, and other sensitive systems. The malicious code executes automatically during installation without user consent or awareness, increasing the risk of widespread credential compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this malicious package version. Users should avoid installing cr-bot-common version 1.0.0 and remove it if already installed. Review systems for signs of credential theft and rotate any potentially compromised secrets. Monitor for suspicious network connections to the indicated attacker domains. Consider using trusted package sources and scanning tools to detect malicious npm packages.
Malicious code in cr-bot-common (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ddd83408820ca65c51cea223a061260109332ba408ca3a43ba00ef827f1ad74f) preinstall.js and postinstall.js execute automatically on npm install. preinstall.js reads.env files from the current and parent directories, walks the working directory and home directory for files matching *.key, *.pem, id_rsa, id_ed25519, wallet.json, keystore.json, and mnemonic.txt, collects process.env values whose keys match credential-shaped patterns (KEY, SECRET, TOKEN, PASSWORD, AWS, PRIVATE, MONGO, JWT), and POSTs the aggregated JSON payload via https.request to https://attacker.com/collect. postinstall.js additionally captures hostname, user, uid/gid, cloud/container context (Docker, Kubernetes, AWS, GCP, Azure), and reads file contents from /root, /home, and /opt matching key/pem/mnemonic/wallet/keystore/secret, then POSTs to https://attacker.com/exfiltrate. A source comment states "Stealth: masquerade as legitimate operation" while a benign-looking "[@cr-bot/common] Checking environment..." message is printed and network errors are silently swallowed.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The cr-bot-common npm package version 1.0.0 includes malicious preinstall.js and postinstall.js scripts that run automatically on installation. The preinstall.js script reads .env files and searches the working and home directories for files containing sensitive credentials such as private keys and wallet files. It also collects environment variables matching credential patterns. This data is sent via HTTPS POST to a malicious endpoint. The postinstall.js script further collects system information including hostname, user IDs, and cloud/container environment details, and reads sensitive files from key system directories before exfiltrating them to another malicious endpoint. The package attempts to hide its activity by printing a benign message and silently ignoring network errors.
Potential Impact
Sensitive credentials and environment variables, including private keys, tokens, passwords, and cloud/container metadata, can be stolen from systems where cr-bot-common version 1.0.0 is installed. This can lead to unauthorized access to user accounts, cloud resources, and other sensitive systems. The malicious code executes automatically during installation without user consent or awareness, increasing the risk of widespread credential compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this malicious package version. Users should avoid installing cr-bot-common version 1.0.0 and remove it if already installed. Review systems for signs of credential theft and rotate any potentially compromised secrets. Monitor for suspicious network connections to the indicated attacker domains. Consider using trusted package sources and scanning tools to detect malicious npm packages.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-16137
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6aa49fe555bf5e2cf5a7d819
Added to database: 09/12/2026, 00:42:13 UTC
Last enriched: 09/12/2026, 00:44:02 UTC
Last updated: 09/12/2026, 00:58:15 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.