Malicious code in hardhat-lock (npm)
The npm package [email protected] is a malicious package that impersonates a legitimate logging/middleware library but contains a large, heavily obfuscated payload that executes immediately upon import. This payload grants attacker-controlled code unrestricted access to environment variables, filesystem, and network within the Node.js process. The package misuses the Ethereum tooling keyword 'hardhat' and copies unrelated project documentation to disguise its true nature.
AI Analysis
Technical Summary
The [email protected] npm package masquerades as a logger/middleware but is in fact a supply-chain attack vector. It copies README badges, LICENSE, and documentation from the unrelated pino project to appear legitimate. Its main code (lib/config.js) is a ~4MB obfuscated JavaScript file employing string array rotation, hex-escaped tokens, numeric wrapper decoders, control-flow flattening, and thousands of inline decoder replacements. This obfuscated code executes immediately when the package is required, injecting attacker-controlled code with full access to environment variables, filesystem, and network capabilities of the host Node.js process. This behavior indicates a malicious payload designed for supply-chain compromise.
Potential Impact
Installing and importing [email protected] results in execution of attacker-controlled code with unrestricted access to sensitive system resources such as environment variables, filesystem, and network. This can lead to data exfiltration, system compromise, and further malicious activities within the affected environment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or importing [email protected]. Conduct audits of dependencies to detect and remove this malicious package. Monitor package sources carefully and prefer verified, trusted packages. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Malicious code in hardhat-lock (npm)
Description
The npm package [email protected] is a malicious package that impersonates a legitimate logging/middleware library but contains a large, heavily obfuscated payload that executes immediately upon import. This payload grants attacker-controlled code unrestricted access to environment variables, filesystem, and network within the Node.js process. The package misuses the Ethereum tooling keyword 'hardhat' and copies unrelated project documentation to disguise its true nature.
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 [email protected] npm package masquerades as a logger/middleware but is in fact a supply-chain attack vector. It copies README badges, LICENSE, and documentation from the unrelated pino project to appear legitimate. Its main code (lib/config.js) is a ~4MB obfuscated JavaScript file employing string array rotation, hex-escaped tokens, numeric wrapper decoders, control-flow flattening, and thousands of inline decoder replacements. This obfuscated code executes immediately when the package is required, injecting attacker-controlled code with full access to environment variables, filesystem, and network capabilities of the host Node.js process. This behavior indicates a malicious payload designed for supply-chain compromise.
Potential Impact
Installing and importing [email protected] results in execution of attacker-controlled code with unrestricted access to sensitive system resources such as environment variables, filesystem, and network. This can lead to data exfiltration, system compromise, and further malicious activities within the affected environment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or importing [email protected]. Conduct audits of dependencies to detect and remove this malicious package. Monitor package sources carefully and prefer verified, trusted packages. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-17233
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6abb4187f7a7c54106cc2f89
Added to database: 09/29/2026, 04:41:43 UTC
Last enriched: 09/29/2026, 04:47:19 UTC
Last updated: 09/29/2026, 18:01:01 UTC
Views: 4
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.