MAL-2026-6707: Malicious code in svgson-lite (npm)
The svgson-lite npm package contains a hidden backdoor in its index.js file. It exports an undocumented getPlugin() function that fetches JavaScript code from a mutable short URL controlled by the package author and executes it via eval(). This behavior is unrelated to the package's stated purpose as an SVG helper and is not documented, indicating deliberate concealment of malicious functionality.
AI Analysis
Technical Summary
The svgson-lite package versions 1.0.0, 1.0.1, 1.0.2, 1.0.4, 1.0.5, 1.0.6, 1.0.7, and 1.0.8 include an undocumented getPlugin() function that performs an HTTP GET request to a short URL controlled by the package author. The response's 'model' field is JSON-parsed and passed directly to eval(), allowing arbitrary code execution in any environment that calls this function. This network fetch and eval behavior is unrelated to SVG processing and is deliberately concealed, representing a backdoor in the package.
Potential Impact
Any consumer invoking the getPlugin() function in affected versions of svgson-lite risks arbitrary code execution controlled by the package author. This can lead to compromise of the host environment, data theft, or further malicious activity. The malicious code is dynamically fetched from a mutable short URL, enabling the attacker to change payloads at will.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid using the affected versions of svgson-lite and remove the package from their dependencies. Since the malicious behavior is triggered only by calling the undocumented getPlugin() function, avoiding its use mitigates risk, but full removal is recommended. Monitor vendor advisories for any future fixes.
MAL-2026-6707: Malicious code in svgson-lite (npm)
Description
The svgson-lite npm package contains a hidden backdoor in its index.js file. It exports an undocumented getPlugin() function that fetches JavaScript code from a mutable short URL controlled by the package author and executes it via eval(). This behavior is unrelated to the package's stated purpose as an SVG helper and is not documented, indicating deliberate concealment of malicious functionality.
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 svgson-lite package versions 1.0.0, 1.0.1, 1.0.2, 1.0.4, 1.0.5, 1.0.6, 1.0.7, and 1.0.8 include an undocumented getPlugin() function that performs an HTTP GET request to a short URL controlled by the package author. The response's 'model' field is JSON-parsed and passed directly to eval(), allowing arbitrary code execution in any environment that calls this function. This network fetch and eval behavior is unrelated to SVG processing and is deliberately concealed, representing a backdoor in the package.
Potential Impact
Any consumer invoking the getPlugin() function in affected versions of svgson-lite risks arbitrary code execution controlled by the package author. This can lead to compromise of the host environment, data theft, or further malicious activity. The malicious code is dynamically fetched from a mutable short URL, enabling the attacker to change payloads at will.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid using the affected versions of svgson-lite and remove the package from their dependencies. Since the malicious behavior is triggered only by calling the undocumented getPlugin() function, avoiding its use mitigates risk, but full removal is recommended. Monitor vendor advisories for any future fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6707
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ff9c68715ace432f6796
Added to database: 07/14/2026, 09:21:32 UTC
Last enriched: 07/14/2026, 09:51:47 UTC
Last updated: 07/14/2026, 09:51:47 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.
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.