CVE-2026-84370 SVGO: removeScripts allows executable links through namespace and control-character bypasses

High 8.2 Published Updated

Attacker can execute script in victim's browser context via bypassed SVG link filtering in SVGO when removeScripts plugin is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-84370?

CVE-2026-84370 is a high-severity cross-site scripting vulnerability in svgo, published on 1 Sep 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.4, 3.3.5, and 4.1.0, the opt-in removeScripts plugin, named removeScriptElement in versions 2 and 3, incompletely filters executable links in plugins/removeScripts.js and lib/svgo/tools.js. The plugin does not recognize namespace-prefixed SVG anchor elements such as svg:a with href or namespaced *:href values, and it does not remove ASCII tab, line-feed, or carriage-return characters before checking URL schemes. Browsers remove those characters before parsing a scheme, allowing an executable link to pass the plugin's check. When an application processes attacker-controlled SVG input and serves the result in an active browser context, a victim who activates the surviving link can execute script in the SVG's origin, expose data, modify content, or perform actions as the victim. This issue is fixed in versions 2.8.4, 3.3.5, and 4.1.0.

Weakness: CWE-79, CWE-184

Which versions are affected by CVE-2026-84370?

6 open source packages ship an affected version, including svgo.

PackageAffectedFixed in
svgo npmFrom 1.0.02.8.4
svgo npmFrom 1.0.02.8.4
svgo npmFrom 3.0.03.3.5
svgo npmFrom 3.0.03.3.5
svgo npmFrom 4.0.04.1.0
svgo npmFrom 4.0.04.1.0

How do I fix CVE-2026-84370?

Upgrade svgo to a fixed version for your release line: 2.8.4, 3.3.5 or 4.1.0.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-84370 being exploited?

There is no known exploitation of CVE-2026-84370 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-84370, GHSA-w27v-7q3p-w38r, ROOT-APP-NPM-CVE-2026-84370.

Is CVE-2026-84370 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free