Malicious code in @openzeppelin-5/contracts (npm)
The @openzeppelin-5/contracts npm package versions 1.0.0 and 1.0.1 contain malicious code that executes automatically during installation. This code harvests environment variables and sensitive credential files from the installer system and exfiltrates this data to a hardcoded external webhook. The malware includes anti-analysis features to evade sandbox detection by checking hostnames. No official patch or remediation guidance is provided.
AI Analysis
Technical Summary
The malicious @openzeppelin-5/contracts package (versions 1.0.0 and 1.0.1) contains a package.json that declares preinstall and postinstall scripts executing 'node index.js || true'. The index.js script collects environment variables matching sensitive keywords (e.g., KEY, TOKEN, SECRET, MNEMONIC, WALLET, AWS, GITHUB, NPM) and reads various credential files such as ~/.aws/credentials, ~/.ssh/id_rsa, ~/.kube/config, ~/.docker/config.json, ~/.npmrc, ~/.git-credentials, and others. The harvested data is sent to a hardcoded webhook.site endpoint via a detached child process with a randomized delay to evade detection. The malware also performs hostname regex checks to avoid running on known sandbox or scanner hosts, indicating anti-analysis capabilities.
Potential Impact
Sensitive environment variables and credential files on the installer’s system can be exfiltrated to an attacker-controlled endpoint, potentially leading to credential compromise and unauthorized access to cloud services, source code repositories, and other sensitive resources. This compromises the security of the affected system and any connected infrastructure relying on these credentials.
Mitigation Recommendations
No official patch or remediation guidance is available. Users should avoid installing versions 1.0.0 and 1.0.1 of the @openzeppelin-5/contracts package. Verify package authenticity before installation and consider using trusted package sources or integrity verification mechanisms. Monitor for suspicious network activity related to webhook.site endpoints. Remove the malicious package if already installed and rotate any potentially exposed credentials.
Malicious code in @openzeppelin-5/contracts (npm)
Description
The @openzeppelin-5/contracts npm package versions 1.0.0 and 1.0.1 contain malicious code that executes automatically during installation. This code harvests environment variables and sensitive credential files from the installer system and exfiltrates this data to a hardcoded external webhook. The malware includes anti-analysis features to evade sandbox detection by checking hostnames. No official patch or remediation guidance is provided.
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 malicious @openzeppelin-5/contracts package (versions 1.0.0 and 1.0.1) contains a package.json that declares preinstall and postinstall scripts executing 'node index.js || true'. The index.js script collects environment variables matching sensitive keywords (e.g., KEY, TOKEN, SECRET, MNEMONIC, WALLET, AWS, GITHUB, NPM) and reads various credential files such as ~/.aws/credentials, ~/.ssh/id_rsa, ~/.kube/config, ~/.docker/config.json, ~/.npmrc, ~/.git-credentials, and others. The harvested data is sent to a hardcoded webhook.site endpoint via a detached child process with a randomized delay to evade detection. The malware also performs hostname regex checks to avoid running on known sandbox or scanner hosts, indicating anti-analysis capabilities.
Potential Impact
Sensitive environment variables and credential files on the installer’s system can be exfiltrated to an attacker-controlled endpoint, potentially leading to credential compromise and unauthorized access to cloud services, source code repositories, and other sensitive resources. This compromises the security of the affected system and any connected infrastructure relying on these credentials.
Defensive Guidance
No official patch or remediation guidance is available. Users should avoid installing versions 1.0.0 and 1.0.1 of the @openzeppelin-5/contracts package. Verify package authenticity before installation and consider using trusted package sources or integrity verification mechanisms. Monitor for suspicious network activity related to webhook.site endpoints. Remove the malicious package if already installed and rotate any potentially exposed credentials.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13738
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a7b6fd9bf8831d5393eb02a
Added to database: 08/11/2026, 18:54:17 UTC
Last enriched: 08/11/2026, 19:04:32 UTC
Last updated: 08/11/2026, 21:56:13 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.