CVE-2026-84370

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

Published Sep 1, 2026 CVSS 3.1 · 8.2 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

SVGO, a popular SVG optimizer used in Node.js projects, failed to filter executable links in its removeScripts plugin from versions 1.0.0 through 2.8.4, 3.3.5, and 4.1.0. The plugin ignored namespace‑prefixed anchors (e.g., svg:a) and did not strip control characters before validating URL schemes. Consequently, a crafted SVG could contain an executable link that bypasses the filter, allowing a victim who activates the link within an active browser context to run script in the SVG’s origin, thereby exposing data, altering content, or performing actions as the victim. The weakness corresponds to CWE‑184 (Blind Index Modification) and CWE‑79 (Cross‑Site Scripting).

Affected Systems

The flaw affects the SVGO library (svg:svgo) and applies to all releases from v1.0.0 up to and including v2.8.4, v3.3.5, and v4.1.0. Systems that process untrusted SVG files and serve the output in browsers are at risk.

Risk and Exploitability

The vulnerability carries a CVSS score of 8.2, indicating high severity. EPSS data is unavailable, and the flaw is not listed in the CISA KEV catalog. The attack vector is application‑side processing of attacker‑controlled SVG content that is later rendered in a browser; it does not require privileged access or additional exploitation steps. Once an SVG containing the hidden link is delivered to a user’s browser, activation of that link allows the attacker to execute code with the same origin privileges as the victim. Due to the widespread use of SVGO in front‑end build pipelines, the risk of exploitation is significant especially in environments that expose optimized SVGs to end users.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SVGO to version 2.8.4 or later (v3.3.5, v4.1.0).
  • If an immediate upgrade is not possible, disable or remove the removeScripts plugin from the build process.
  • Ensure that any SVG files processed by SVGO are treated as untrusted input and validate or sanitize them before serving.

Generated by OpenCVE AI on September 2, 2026 at 03:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-w27v-7q3p-w38r SVGO: removeScripts allows executable links through namespace and control-character bypasses
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Svg
Svg svgo
Vendors & Products Svg
Svg svgo
Type Values Removed Values Added
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.
Title SVGO: removeScripts allows executable links through namespace and control-character bypasses
Weaknesses CWE-184
CWE-79
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N'}

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 4, 2026, 2:12 AM
Reserved
Sep 1, 2026, 4:27 PM
Status
Deferred
Published
Sep 1, 2026, 9:18 PM
Modified
Sep 9, 2026, 9:09 PM