Skip to main content

CVE-2026-84370 — Vulnerability in svgo — CVE Details

HIGH

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

Published September 8, 2026Updated September 8, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.53%). Schedule for your next planned update.

Does your project use an affected svgo version?

Paste your package-lock.json to check it for CVE-2026-84370 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Summary

SVGO's opt-in removeScripts plugin failed to remove some executable links. Namespace-prefixed SVG anchors and URL schemes containing ASCII tabs or newlines could bypass its checks. Applications that used this plugin as their only protection for untrusted SVG input could expose users to cross-site scripting (XSS).

SVGO is an optimizer rather than a comprehensive sanitization library, but removeScripts is maintained for consumers that already rely on it to remove common script execution paths.

Details

Two related bypasses were present:

  1. The plugin inspected unprefixed SVG <a> elements but did not recognize namespace-prefixed SVG anchors such as <svg:a> when the prefix was bound to the SVG namespace. Their executable href or namespaced *:href values remained intact.
  2. The URL check did not account for ASCII tab, line-feed, or carriage-return characters embedded in a scheme. Browsers remove these characters before parsing the scheme, so values such as java&#9;script: could remain executable after bypassing the plugin's javascript: check.

Anchors in unrelated custom namespaces are not executable SVG anchors and remain untouched.

Impact

If an application optimized attacker-controlled SVGs with removeScripts and then served the result in an active browser context, a victim could follow a link that executes script in the SVG's origin. Depending on the embedding and origin configuration, this could expose cookies or local storage, modify content, or perform actions as the victim.

The plugin is opt-in, so consumers that do not enable it are not relying on the affected behavior. Typical local optimization of trusted SVG files is not affected.

Patches

Upgrade to one of the following releases for the maintained release line in use:

Release linePatched versionPlugin
v22.8.4removeScriptElement
v33.3.5removeScriptElement
v44.1.0removeScripts

The fix makes SVG anchor handling namespace-aware and strips ASCII tabs, line feeds, and carriage returns before checking executable URL schemes.

SVGO v1 is no longer maintained. Users of v1 should upgrade to a supported release line.

Workarounds

For hostile input, use a dedicated SVG sanitization tool before passing the SVG to SVGO. Applications can also reject links from untrusted SVG input and avoid serving user-controlled SVGs in an active same-origin context.

References

Advisory Timeline

  • First published September 8, 2026 (79 days ago).
  • Last revised September 8, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update svgo to 2.8.4 or later
npm install svgo@2.8.4
npm
Update svgo to 3.3.5 or later
npm install svgo@3.3.5
npm
Update svgo to 4.1.0 or later
npm install svgo@4.1.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: npm (1).

PackageFixed In
svgo npm · Affected: All versions2.8.4
svgo npm · Affected: All versions3.3.5
svgo npm · Affected: All versions4.1.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Frequently Asked Questions

What is CVE-2026-84370?
SVGO: removeScripts allows executable links through namespace and control-character bypasses. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.2/10).
How do I check if my project is affected by CVE-2026-84370?
CVE-2026-84370 affects svgo. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-84370 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.2

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.53%
EPSS percentile: 37.9

This is a below-median EPSS score — only 37.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-w27v-7q3p-w38r

Related CVEs

  • CVE-2026-73650
    HIGH

    SVGO removeScripts plugin leaves some executable scripts intact

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json