svgson-lite (npm) · Malicious Code
Affects svgson-liteSource GCVE Database
Malicious package : remove svgson-lite and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 15:56 UTC
Malicious package
Published to npm · OSV MAL-2026-6707
What to do
Remove svgson-lite from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmsvgson-lite | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- npmjs.com/package/svgson-lite/v/1.0.1 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.0 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.5 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.6 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.7 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.2 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.4 (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.8 (opens in a new tab)
- github.com/advisories/GHSA-g7rx-jhhj-8whr (opens in a new tab)
- npmjs.com/package/svgson-lite/v/1.0.3 (opens in a new tab)