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.
Published: 2026-08-13
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Thu, 13 Aug 2026 20:00:00 +0000

Type Values Removed Values Added
First Time appeared Svg
Svg svgo
Vendors & Products Svg
Svg svgo

Thu, 13 Aug 2026 18:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-13T18:08:36.292Z

Reserved: 2026-08-13T14:04:09.604Z

Link: CVE-2026-73650

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T19:17:38.460

Modified: 2026-08-13T19:17:38.460

Link: CVE-2026-73650

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T19:45:17Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

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