svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
4.1.0 is the newest release of 4.x.
In short
2 faster2 fixed2 changed1 internal
Security
Fixes 1 advisory that affected 4.0.0
- HighSVGO DoS through entity expansion in DOCTYPE (Billion Laughs)GHSA-xpqw-6gx7-v673 · 4 Mar 2026Fixed in 4.0.1
3 advisories affect 4.0.1; 4.1.0 fixes them
- HighSVGO: removeScripts allows executable links through namespace and control-character bypassesGHSA-w27v-7q3p-w38r · 8 Sep 2026Fixed in 4.1.0
- HighSVGO removeScripts plugin leaves some executable scripts intactGHSA-2p49-hgcm-8545 · 21 Jul 2026Fixed in 4.0.2
- ModerateSVGO: removeScripts incompletely sanitizes executable HTML in SVG foreignObject elementsGHSA-4vpr-x523-8j87 · 8 Sep 2026Fixed in 4.1.0
Release note
What's Changed
Bug Fixes
removeEmptyContainers, removed leftover
<use>elements referencing an empty container that were removed.removeUnknownsAndDefaults, don't remove attributes if they're referenced in attribute selectors (CSS).
Performance
convertPathData, refactor to reduce redundant equality checks.
removeHiddenElems, compute styles lazily.
Other Changes
Plugins no longer include if they are enabled or disabled by default, as this was written inconsistently. The
--show-pluginsargument appends the presets a plugin is in to the end of the line.Plugin/preset types to enforce the name start with
preset-if it is a preset (collection of plugins).
Metrics
Before and after of the browser bundle of each respective version:
| v4.0.0 | v4.0.1 | Delta | |
|---|---|---|---|
| svgo.browser.js | 780.2 kB | 781.5 kB | ⬆️ 1.3 kB |
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.