CVE-2026-73650
SVGO: removeScripts plugin leaves some executable scripts intact
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.2
SVGO: removeScripts plugin leaves some executable scripts intact
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
- Record
CVE-2026-73650- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-79, CWE-184
- Updated
- 2026-11-02
EUVDEUVD-2026-58193
8.2
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
- Record
EUVD-2026-58193- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-2p49-hgcm-8545
8.2
SVGO removeScripts plugin leaves some executable scripts intact
Summary
SVGO's removeScripts plugin (disabled by default) removes scripts from the SVG, however executable scripts were left intact in some cases. If a consumer relied on this plugin for sanitization and served them to users, these SVGs could open up doors to XSS.
Details
SVGO has a plugin for removing scripts from an SVG, which removes:
<script>elements- JavaScript URIs (v4 and v3 only)
on…event handlers (v4 and v3 only)
While SVGO is not a sanitization library, SVGO continues to maintain the plugin for those already using it for this purpose.
However, there were two problems:
- SVGO did not check namespaced/prefixed
scriptelements, for example if one declared an explicit prefix for the SVG namespace (<svg:script>) instead of using the default namespace (<script>), the<svg:script>tag would be left intact. - SVGO case sensitively matched JavaScript URIs, but it should've been case-insensitive.
Proof of Concept
import { optimize } from 'svgo';
/** Presume that this string was obtained in some other way, such as network. */
const original = `
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:uwu="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" version="1.1">
<a uwu:href="JavaScript:(() => { alert(document.cookie) })();"><text y="30">uwu</text></a>
<svg:script>
alert(document.cookie);
</svg:script>
</svg>
`;
optimize(original, {
plugins: ['removeScripts']
});
// Did not remove <svg:script> or uwu:href="JavaScript:…—still executed by browsers.
Impact
If you run SVGO on untrusted input (e.g., user uploads to a web application) and you depended on removeScripts, then some scripts may still be present. If that SVG was then opened directly by another user on the same domain, it could invoke scripts that could read local storage or cookies.
This may affect you if you have enabled one of the following:
| SVGO Version | Plugin Name | |---|---| | v4 | removeScripts | | v3 | removeScriptElement | | v2 | removeScriptElement | | v1 | removeScriptElement |
It's unlikely to impact users who just use SVGO locally on their own SVGs or in build pipelines.
Patches
>= 3.0.0, <= 4.0.1
SVGO patched v4.0.2 and v3.3.4. Just upgrade the dependency using your preferred package manager! For example:
yarn up svgo
# or if SVGO is a nested dependency
yarn up -R svgo
The proposed fix is to improve our namespace-aware handling to explicitly act on the default namespace, SVG namespace, and XHTML namespace only. This handles all scripts that are executed by browsers, but will leave intact custom prefixes that happen to have an element called <*:script> which clients shouldn't treat as executable.
>= 2.0.0, <= 2.8.2
SVGO patched v2.8.3, however SVGO v2 explicitly only implements and documents that it will remove <script> elements and nothing more. It has the namespace aware handling for tags like <svg:script> or <xhtml:script>, but has not been updated to remove JavaScript URIs or event handlers like >= v3. If this is something you need, please upgrade to v4 or v3, or reach for one of the documented workarounds at the end.
>= 1.0.0, <= 1.3.2
SVGO v1 has been deprecated for a while now and won't be patched. Please upgrade to a more recent version! If something is preventing you from doing so, please reach out! We're happy to expand our migration guides or support you if you're having trouble.
Workarounds
If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO.
- Record
GHSA-2p49-hgcm-8545- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-79, CWE-184
- Updated
- 2026-11-02
NVD
8.2
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
- Record
CVE-2026-73650- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-79, CWE-184
- Updated
- 2026-11-02
OSV
8.2
SVGO: removeScripts plugin leaves some executable scripts intact
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
- Record
CVE-2026-73650- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-184, CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-73650
8.2
SVGO, short for SVG Optimizer, is a Node.js library and command-line application for optimizing SVG files. From version 1.0.0 until versions 2.8.3, 3.3.4, and 4.0.2, the removeScripts plugin, named removeScriptElement in versions 1 through 3, can leave executable content in optimized SVGs because it does not remove namespaced or prefixed script elements such as svg:script and, in versions 3 and 4, matches JavaScript URIs case sensitively. Applications that process untrusted SVG input with this plugin enabled and serve the result can allow scripts to execute when another user opens the SVG, exposing local storage or cookies. This issue is fixed in versions 2.8.3, 3.3.4, and 4.0.2.
- Record
DEBIAN-CVE-2026-73650- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-02
Show 10 moreShow less
OSVGHSA-2p49-hgcm-8545
8.2
SVGO removeScripts plugin leaves some executable scripts intact
Summary
SVGO's removeScripts plugin (disabled by default) removes scripts from the SVG, however executable scripts were left intact in some cases. If a consumer relied on this plugin for sanitization and served them to users, these SVGs could open up doors to XSS.
Details
SVGO has a plugin for removing scripts from an SVG, which removes:
<script>elements- JavaScript URIs (v4 and v3 only)
on…event handlers (v4 and v3 only)
While SVGO is not a sanitization library, SVGO continues to maintain the plugin for those already using it for this purpose.
However, there were two problems:
- SVGO did not check namespaced/prefixed
scriptelements, for example if one declared an explicit prefix for the SVG namespace (<svg:script>) instead of using the default namespace (<script>), the<svg:script>tag would be left intact. - SVGO case sensitively matched JavaScript URIs, but it should've been case-insensitive.
Proof of Concept
import { optimize } from 'svgo';
/** Presume that this string was obtained in some other way, such as network. */
const original = `
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:uwu="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" version="1.1">
<a uwu:href="JavaScript:(() => { alert(document.cookie) })();"><text y="30">uwu</text></a>
<svg:script>
alert(document.cookie);
</svg:script>
</svg>
`;
optimize(original, {
plugins: ['removeScripts']
});
// Did not remove <svg:script> or uwu:href="JavaScript:…—still executed by browsers.
Impact
If you run SVGO on untrusted input (e.g., user uploads to a web application) and you depended on removeScripts, then some scripts may still be present. If that SVG was then opened directly by another user on the same domain, it could invoke scripts that could read local storage or cookies.
This may affect you if you have enabled one of the following:
| SVGO Version | Plugin Name | |---|---| | v4 | removeScripts | | v3 | removeScriptElement | | v2 | removeScriptElement | | v1 | removeScriptElement |
It's unlikely to impact users who just use SVGO locally on their own SVGs or in build pipelines.
Patches
>= 3.0.0, <= 4.0.1
SVGO patched v4.0.2 and v3.3.4. Just upgrade the dependency using your preferred package manager! For example:
yarn up svgo
# or if SVGO is a nested dependency
yarn up -R svgo
The proposed fix is to improve our namespace-aware handling to explicitly act on the default namespace, SVG namespace, and XHTML namespace only. This handles all scripts that are executed by browsers, but will leave intact custom prefixes that happen to have an element called <*:script> which clients shouldn't treat as executable.
>= 2.0.0, <= 2.8.2
SVGO patched v2.8.3, however SVGO v2 explicitly only implements and documents that it will remove <script> elements and nothing more. It has the namespace aware handling for tags like <svg:script> or <xhtml:script>, but has not been updated to remove JavaScript URIs or event handlers like >= v3. If this is something you need, please upgrade to v4 or v3, or reach for one of the documented workarounds at the end.
>= 1.0.0, <= 1.3.2
SVGO v1 has been deprecated for a while now and won't be patched. Please upgrade to a more recent version! If something is preventing you from doing so, please reach out! We're happy to expand our migration guides or support you if you're having trouble.
Workarounds
If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO.
- Record
GHSA-2p49-hgcm-8545- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-184, CWE-79
- Updated
- 2026-11-02
OSVCLSA-2026-1784682960 No score
TuxCare security update for svgo (1 CVE)
TuxCare rebuilt svgo to address 1 CVE. Fixed in 2.8.0-tuxcare.2.
- Record
CLSA-2026-1784682960- Updated
- 2026-11-02
OSVCLSA-2026-1790176195 No score
TuxCare security update for svgo (1 CVE)
TuxCare rebuilt svgo to address 1 CVE. Fixed in 2.8.0-tuxcare.4.
- Record
CLSA-2026-1790176195- Updated
- 2026-11-02
OSVCLSA-2026-1791843793 No score
TuxCare security update for svgo (2 CVEs)
TuxCare rebuilt svgo to address 2 CVEs. Fixed in 1.3.2-tuxcare.2.
- Record
CLSA-2026-1791843793- Updated
- 2026-11-02
OSVCLSA-2026-1792163346 No score
TuxCare security update for svgo (3 CVEs)
TuxCare rebuilt svgo to address 3 CVEs. Fixed in 4.0.1-tuxcare.1.
- Record
CLSA-2026-1792163346- Updated
- 2026-11-02
OSVCLSA-2026-1792183680 No score
TuxCare security update for svgo (3 CVEs)
TuxCare rebuilt svgo to address 3 CVEs. Fixed in 2.8.2-tuxcare.1.
- Record
CLSA-2026-1792183680- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11680-1 No score
agama-web-ui-24+0.a836cced5-52.1 on GA media
These are all security issues fixed in the agama-web-ui-24+0.a836cced5-52.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11680-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:12070-1 No score
velociraptor-0.76.7.0.git145.b60ef1146-1.1 on GA media
These are all security issues fixed in the velociraptor-0.76.7.0.git145.b60ef1146-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:12070-1- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2026-73650 No score
CVE-2026-73650 in svgo - Patched by Root
Root has patched CVE-2026-73650 in the svgo package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-73650- Updated
- 2026-11-02
OSVROOT-APP-NPM-GHSA-2p49-hgcm-8545 No score
GHSA-2p49-hgcm-8545 in svgo - Patched by Root
Root has patched GHSA-2p49-hgcm-8545 in the svgo package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-GHSA-2p49-hgcm-8545- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
svgonpm |
1.0.0 up to 2.8.3 | 2.8.3 |
svgonpm |
3.0.0 up to 3.3.4 | 3.3.4 |
svgonpm |
4.0.0 up to 4.0.2 | 4.0.2 |
svgoTuxCare:npm |
2.8.0-tuxcare.0 up to 2.8.0-tuxcare.2, plus listed versions 2.8.02.8.0-tuxcare.1 |
2.8.0-tuxcare.2 |
svgoTuxCare:npm |
2.8.0-tuxcare.0 up to 2.8.0-tuxcare.4, plus listed versions 2.8.02.8.0-tuxcare.12.8.0-tuxcare.22.8.0-tuxcare.3 |
2.8.0-tuxcare.4 |
svgoTuxCare:npm From an advisory covering 2 CVEs |
1.3.2-tuxcare.0 up to 1.3.2-tuxcare.2, plus listed versions 1.3.21.3.2-tuxcare.1 |
1.3.2-tuxcare.2 |
svgoTuxCare:npm From an advisory covering 3 CVEs |
4.0.1-tuxcare.0 up to 4.0.1-tuxcare.1, plus listed versions 4.0.1 |
4.0.1-tuxcare.1 |
svgoTuxCare:npm From an advisory covering 3 CVEs |
2.8.2-tuxcare.0 up to 2.8.2-tuxcare.1, plus listed versions 2.8.2 |
2.8.2-tuxcare.1 |
node-svgoDebian:14 |
before 3.3.5+ds-1, plus listed versions 3.3.2+ds-1 |
3.3.5+ds-1 |
svgoRoot:npm |
before 3.3.3-aikido.3 | 3.3.3-aikido.32.8.0-aikido.53.3.2-aikido.31.3.2-aikido.41.3.0-aikido.31.3.2-aikido.31.3.0-aikido.22.8.0-aikido.33.3.2-aikido.23.3.3-aikido.21.3.2-aikido.22.8.0-aikido.43.3.4-aikido.12.8.3-aikido.11.3.2-aikido.12.8.2-aikido.13.3.3-aikido.14.0.1-aikido.1 |
@rootio/svgoRoot:npm |
before 3.3.3-root.io.3 | 3.3.3-root.io.32.8.0-root.io.53.3.2-root.io.31.3.2-root.io.41.3.0-root.io.31.3.2-root.io.31.3.0-root.io.22.8.0-root.io.33.3.2-root.io.23.3.3-root.io.21.3.2-root.io.22.8.0-root.io.43.3.4-root.io.12.8.3-root.io.11.3.2-root.io.12.8.2-root.io.13.3.3-root.io.14.0.1-root.io.1 |
agama-web-uiopenSUSE:Tumbleweed From an advisory covering 19 CVEs |
before 24+0.a836cced5-52.1 | 24+0.a836cced5-52.1 |
velociraptoropenSUSE:Tumbleweed From an advisory covering 40 CVEs |
before 0.76.7.0.git145.b60ef1146-1.1 | 0.76.7.0.git145.b60ef1146-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-73650 is a high vulnerability (CVSS 8.2) in Svg Svgo, published July 21, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in svgo 2.8.3.
References
github.com/svg/svgo/security/advisories/GHSA-2p49-hgcm-8545
github.com/svg/svgo/commit/628e3bc7336625a30365d0a9b60185307d852466
github.com/svg/svgo/commit/72a23886b4698b27624b936f3a15a80afd36d75f
github.com/svg/svgo/commit/f529cfccc6c154d6f6eabe276ec637a8c5db6763
github.com/svg/svgo/releases/tag/v2.8.3
github.com/svg/svgo/releases/tag/v3.3.4
Show 59 moreShow less
github.com/svg/svgo/releases/tag/v4.0.2
github.com/advisories/GHSA-2p49-hgcm-8545
github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73650.json
nvd.nist.gov/vuln/detail/CVE-2026-73650
security-tracker.debian.org/tracker/CVE-2026-73650
github.com/svg/svgo
suse.com/security/cve/CVE-2025-7783
suse.com/security/cve/CVE-2026-13149
suse.com/security/cve/CVE-2026-13676
suse.com/security/cve/CVE-2026-33245
suse.com/security/cve/CVE-2026-49356
suse.com/security/cve/CVE-2026-53550
suse.com/security/cve/CVE-2026-53632
suse.com/security/cve/CVE-2026-54466
suse.com/security/cve/CVE-2026-55602
suse.com/security/cve/CVE-2026-67313
suse.com/security/cve/CVE-2026-67315
suse.com/security/cve/CVE-2026-67317
suse.com/security/cve/CVE-2026-67319
suse.com/security/cve/CVE-2026-67321
suse.com/security/cve/CVE-2026-69153
suse.com/security/cve/CVE-2026-73086
suse.com/security/cve/CVE-2026-73088
suse.com/security/cve/CVE-2026-73089
suse.com/security/cve/CVE-2026-73650
suse.com/security/cve/CVE-2025-0914
suse.com/security/cve/CVE-2026-12143
suse.com/security/cve/CVE-2026-14257
suse.com/security/cve/CVE-2026-17535
suse.com/security/cve/CVE-2026-18348
suse.com/security/cve/CVE-2026-18636
suse.com/security/cve/CVE-2026-18638
suse.com/security/cve/CVE-2026-18639
suse.com/security/cve/CVE-2026-18860
suse.com/security/cve/CVE-2026-27601
suse.com/security/cve/CVE-2026-29074
suse.com/security/cve/CVE-2026-41650
suse.com/security/cve/CVE-2026-45623
suse.com/security/cve/CVE-2026-5329
suse.com/security/cve/CVE-2026-56852
suse.com/security/cve/CVE-2026-59869
suse.com/security/cve/CVE-2026-6290
suse.com/security/cve/CVE-2026-64951
suse.com/security/cve/CVE-2026-64952
suse.com/security/cve/CVE-2026-64954
suse.com/security/cve/CVE-2026-65903
suse.com/security/cve/CVE-2026-65912
suse.com/security/cve/CVE-2026-65913
suse.com/security/cve/CVE-2026-65914
suse.com/security/cve/CVE-2026-67314
suse.com/security/cve/CVE-2026-67320
suse.com/security/cve/CVE-2026-6863
suse.com/security/cve/CVE-2026-69152
suse.com/security/cve/CVE-2026-6948
suse.com/security/cve/CVE-2026-73646
suse.com/security/cve/CVE-2026-7572
suse.com/security/cve/CVE-2026-7573
suse.com/security/cve/CVE-2026-84369
suse.com/security/cve/CVE-2026-84370