Every CVE Search/ Get API key

CVE-2026-73650

SVGO: removeScripts plugin leaves some executable scripts intact

8.2 HighFix available

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

0.43%Up 0.2 points since Aug 14, 2026
90%50%10%1%

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 HighCVSS: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 HighCVSS: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 script elements, 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:(() =&gt; { 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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 script elements, 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:(() =&gt; { 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 HighCVSS: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

Affected packages
PackageAffectedFixed
svgo
npm
1.0.0 up to 2.8.3
2.8.3
svgo
npm
3.0.0 up to 3.3.4
3.3.4
svgo
npm
4.0.0 up to 4.0.2
4.0.2
svgo
TuxCare: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
svgo
TuxCare: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
svgo
TuxCare: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
svgo
TuxCare: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
svgo
TuxCare: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-svgo
Debian:14
before 3.3.5+ds-1, plus listed versions
3.3.2+ds-1
3.3.5+ds-1
svgo
Root: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/svgo
Root: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-ui
openSUSE:Tumbleweed
From an advisory covering 19 CVEs
before 24+0.a836cced5-52.1
24+0.a836cced5-52.1
velociraptor
openSUSE: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

History
RecordedChangedSources
affected, facts
first indexedCVE 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

Show 59 moreShow less
MoveEnter Open