svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
2.8.4 is the newest release of 2.x.
In short
4 new4 changed
Security
4 advisories affect 2.8.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
If you enjoy SVGO and would like to support our work, consider sponsoring us directly via our OpenCollective.
Join us in our discord
Features and bug fixes
Added --no-color flag for testing purposes but you may find it useful (#1588)
Handle url() in style attributes properly (#1592)
removeXMLNS plugin now removes
xmlns:xlinkattribute (#1508)Load .cjs configuration only with
requireto fix segfaults in linux (#1605)
Refactorings
Simplified and covered with types svg stringifier (#1593)
Migrated to visitor api and covered with types removeEmptyAttrs plugin (#1594)
Migrated to visitor api and covered with types inlineStyles plugin (#1601)
Migrated to picocolors (#1606)
DX
I found some users are trying to enable plugins which are not part of default preset, for example
{
name: 'preset-default',
params: {
overrides: {
cleanupListOfValues: true
}
}
}To fix this I made docs more concrete about plugin (5165ccb)
and introduced a warning when true is specified in overrides (cb7e9be).
Please give us feedback if you still have issues.
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.