Malicious code in path-addon (npm)
The npm package 'path-addon' impersonates the Node.js core 'path' module but contains malicious code that fetches and executes remote JavaScript code at module load time. This behavior allows an attacker to run arbitrary code in any process that imports this package. The package uses obfuscation techniques such as base64 encoding of the remote URL to evade detection. Multiple versions of 'path-addon' are affected, and the package is identified as malicious by the OpenSSF Package Analysis project.
AI Analysis
Technical Summary
The 'path-addon' npm package (versions 1.0.2 through 1.0.7) is a typosquatting malicious package that mimics the legitimate Node.js 'path' module. It contains a remote code execution dropper that, upon requiring the module, decodes a base64-encoded URL pointing to an anonymous JSON paste service, fetches JavaScript code from that URL, and executes it via eval() without any integrity checks or version pinning. This allows an attacker to execute arbitrary JavaScript code in the context of any application importing 'path-addon'. The obfuscation and use of a mutable remote payload make this a clear attacker tool. The OpenSSF Package Analysis project confirms its malicious nature based on network communication and command execution behavior.
Potential Impact
Any Node.js process that imports the 'path-addon' package will execute attacker-controlled JavaScript code fetched from a remote source at runtime. This can lead to remote code execution, potentially compromising the host environment, stealing data, or performing other malicious actions. The lack of integrity checks or version constraints means the attacker can change the payload at any time, increasing risk.
Mitigation Recommendations
Users should immediately remove and avoid using the 'path-addon' package. Replace it with the official Node.js 'path' module or a trusted alternative. Since this is a malicious package, no official patch exists. Conduct audits of dependencies to detect and eliminate typosquatting or malicious packages. Monitor package sources carefully to prevent accidental installation.
Malicious code in path-addon (npm)
Description
The npm package 'path-addon' impersonates the Node.js core 'path' module but contains malicious code that fetches and executes remote JavaScript code at module load time. This behavior allows an attacker to run arbitrary code in any process that imports this package. The package uses obfuscation techniques such as base64 encoding of the remote URL to evade detection. Multiple versions of 'path-addon' are affected, and the package is identified as malicious by the OpenSSF Package Analysis project.
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 'path-addon' npm package (versions 1.0.2 through 1.0.7) is a typosquatting malicious package that mimics the legitimate Node.js 'path' module. It contains a remote code execution dropper that, upon requiring the module, decodes a base64-encoded URL pointing to an anonymous JSON paste service, fetches JavaScript code from that URL, and executes it via eval() without any integrity checks or version pinning. This allows an attacker to execute arbitrary JavaScript code in the context of any application importing 'path-addon'. The obfuscation and use of a mutable remote payload make this a clear attacker tool. The OpenSSF Package Analysis project confirms its malicious nature based on network communication and command execution behavior.
Potential Impact
Any Node.js process that imports the 'path-addon' package will execute attacker-controlled JavaScript code fetched from a remote source at runtime. This can lead to remote code execution, potentially compromising the host environment, stealing data, or performing other malicious actions. The lack of integrity checks or version constraints means the attacker can change the payload at any time, increasing risk.
Mitigation Recommendations
Users should immediately remove and avoid using the 'path-addon' package. Replace it with the official Node.js 'path' module or a trusted alternative. Since this is a malicious package, no official patch exists. Conduct audits of dependencies to detect and eliminate typosquatting or malicious packages. Monitor package sources carefully to prevent accidental installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-3311
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-hqv8-vf3j-m8q6"]
- Ecosystems
- ["npm"]
Threat ID: 6a96f318acd9273b49e49534
Added to database: 09/01/2026, 15:45:28 UTC
Last enriched: 09/08/2026, 11:38:40 UTC
Last updated: 09/09/2026, 19:21:17 UTC
Views: 5
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.
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.