svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
2.8.4 is the newest release of 2.x.
In short
3 fixed7 changed
Security
4 advisories affect 2.1.0; 2.8.4 fixes them
- HighSVGO: removeScripts allows executable links through namespace and control-character bypassesGHSA-w27v-7q3p-w38r · 8 Sep 2026Fixed in 2.8.4
- HighSVGO removeScripts plugin leaves some executable scripts intactGHSA-2p49-hgcm-8545 · 21 Jul 2026Fixed in 2.8.3
- HighSVGO DoS through entity expansion in DOCTYPE (Billion Laughs)GHSA-xpqw-6gx7-v673 · 4 Mar 2026Fixed in 2.8.1
- ModerateSVGO: removeScripts incompletely sanitizes executable HTML in SVG foreignObject elementsGHSA-4vpr-x523-8j87 · 8 Sep 2026Fixed in 2.8.4
Release note
This release introduced two big changes
We forked sax parser to fix issues inaccessible from public api (github.com/svg/sax)
We added regression tests which already caught 4 bugs (WIP)
See fixed bugs
Fixed empty
<svg />with enabled cleanupIDs plugin (9b97e06)Fail when file specified in
--configflag does not exist or json string is specified (a855b40)Disabled convertStyleToAttrs by default (#1365)
Preserve whitespace in elements containing text (#1220)
Fixed removing
xml:space="preserve"(776ec1e)Preserve whitespace in nested textual elements (9de471a)
Keep empty
<g>whenfilterattribute is specified (c1d5f0f)
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.