Malicious code in fastify-addon (npm)
The fastify-addon npm package is a malicious typosquatting package impersonating the legitimate fastify-plugin. It fetches attacker-controlled JavaScript code from a mutable third-party JSON paste service and executes it via eval at runtime. This allows arbitrary code execution with full access to the host environment, including credentials and filesystem. Any system requiring this package is considered fully compromised. Immediate removal and secret/key rotation are strongly advised.
AI Analysis
Technical Summary
fastify-addon is a typosquatting malicious package targeting users expecting fastify-plugin. Its package.json and README mimic the legitimate package to deceive users. Upon require, it executes a script that fetches a base64-encoded URL pointing to a JSON paste service, retrieves the 'content' field, and executes it with eval. Because the payload is hosted on a mutable third-party service, the attacker can change the executed code at any time, resulting in arbitrary code execution with full privileges in the consumer environment. This compromises the host system entirely.
Potential Impact
Any process that requires fastify-addon will execute attacker-controlled code with full access to the environment, credentials, and filesystem. This leads to complete compromise of the affected system. All secrets and keys stored on the compromised system should be considered exposed and must be rotated from a clean environment. Removal of the package alone does not guarantee eradication of all malicious artifacts.
Mitigation Recommendations
No official patch or fix is available. The package should be immediately removed from all systems. All secrets and credentials stored on affected systems must be rotated from a secure, uncompromised environment. Due to the full compromise risk, affected systems should be thoroughly audited and potentially rebuilt to ensure no persistent malicious code remains.
Malicious code in fastify-addon (npm)
Description
The fastify-addon npm package is a malicious typosquatting package impersonating the legitimate fastify-plugin. It fetches attacker-controlled JavaScript code from a mutable third-party JSON paste service and executes it via eval at runtime. This allows arbitrary code execution with full access to the host environment, including credentials and filesystem. Any system requiring this package is considered fully compromised. Immediate removal and secret/key rotation are strongly advised.
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
fastify-addon is a typosquatting malicious package targeting users expecting fastify-plugin. Its package.json and README mimic the legitimate package to deceive users. Upon require, it executes a script that fetches a base64-encoded URL pointing to a JSON paste service, retrieves the 'content' field, and executes it with eval. Because the payload is hosted on a mutable third-party service, the attacker can change the executed code at any time, resulting in arbitrary code execution with full privileges in the consumer environment. This compromises the host system entirely.
Potential Impact
Any process that requires fastify-addon will execute attacker-controlled code with full access to the environment, credentials, and filesystem. This leads to complete compromise of the affected system. All secrets and keys stored on the compromised system should be considered exposed and must be rotated from a clean environment. Removal of the package alone does not guarantee eradication of all malicious artifacts.
Mitigation Recommendations
No official patch or fix is available. The package should be immediately removed from all systems. All secrets and credentials stored on affected systems must be rotated from a secure, uncompromised environment. Due to the full compromise risk, affected systems should be thoroughly audited and potentially rebuilt to ensure no persistent malicious code remains.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5566
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-3237-pr3f-cm2g"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577edd68715ace43b400ae
Added to database: 07/15/2026, 12:36:45 UTC
Last enriched: 07/15/2026, 12:50:13 UTC
Last updated: 07/31/2026, 06:54:59 UTC
Views: 31
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.