CVE-2026-73650

SVGO: removeScripts plugin leaves some executable scripts intact

Published Aug 13, 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.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.

Analysis

AI-generated

Technical impact

The removeScripts plugin fails to delete script elements that are namespaced or prefixed, such as <svg:script>, and incorrectly processes JavaScript URIs. As a result, executable scripts may remain in SVG files after optimization. When an attacker crafts such a malicious SVG and an application that enables this plugin optimizes and serves the file, the script runs in the user’s browser, exposing local storage or cookies, which is a cross‑site scripting flaw.

Affected Systems

The vulnerability affects all SVGO releases from the initial 1.0.0 through 2.8.3, 3.3.4, and 4.0.2. The problematic code resides in the removeScriptElement (v1‑v3) or removeScripts plugin. Any application that uses SVGO to optimize SVG input—such as web services, static site generators, or image processing pipelines—is at risk unless the user upgrades past the affected releases.

Risk and Exploitability

With a CVSS score of 8.2 the flaw is classified as high severity, and it is not yet listed in the CISA KEV catalog. The EPSS score is not available. Based on the description, the most likely attack vector is a remote attacker delivering a crafted SVG to the application for optimization; when another user opens the resulting SVG in a browser, the embedded script executes. Mitigation requires disabling or upgrading the plugin to eliminate the risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SVGO to version 2.8.3, 3.3.4, 4.0.2, or a later release that contains the fix
  • If an immediate upgrade is not possible, remove or disable the removeScripts/removeScriptElement plugin from the SVGO configuration
  • Sanitize any SVG input before passing it to the optimizer, ensuring that no executable script elements remain before the file is served to users

Generated by OpenCVE AI on August 13, 2026 at 19:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2p49-hgcm-8545 SVGO removeScripts plugin leaves some executable scripts intact
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', '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.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.
Title SVGO: removeScripts plugin leaves some executable scripts intact
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
Aug 18, 2026, 1:31 AM
Reserved
Aug 13, 2026, 2:04 PM
Status
Deferred
Published
Aug 13, 2026, 7:17 PM
Modified
Sep 18, 2026, 8:09 PM