Skip to main content

SVGO CVE-2026-73650

| EUVDEUVD-2026-58193 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-08-13 GitHub_M GHSA-2p49-hgcm-8545
8.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Upload crafted SVG with <svg:script> and mixed-case JavaScript URI
  2. Delivery
    Application processes upload with SVGO removeScripts plugin enabled
  3. Exploit
    Plugin fails namespace check, leaves script payload intact
  4. Install
    Poisoned SVG stored and served by application
  5. C2
    Victim user opens SVG in browser on application origin
  6. Execute
    Script executes, reads cookies or local storage
  7. Impact
    Session data exfiltrated to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three conditions must all be true simultaneously. First, the application must pass untrusted SVG content - such as user-uploaded files from external parties - through SVGO's optimization pipeline; SVGO used only at build time on developer-controlled assets is not affected. Second, the removeScriptElement plugin (v1/v2/v3) or removeScripts plugin (v4) must be explicitly enabled in the SVGO plugin configuration array, as this plugin is disabled by default in all SVGO versions. Third, the SVGO-processed SVG must be served to and opened directly in a browser by a different user on the same origin as the application, providing the cross-origin script execution context. Exploitation is additionally bounded by the required victim interaction (UI:R in CVSS): the crafted SVG must actually be rendered in a browser rather than processed server-side only. Applications that do not serve optimized SVGs to end users, those processing only trusted SVG assets, and those running SVGO without the script-removal plugin are not vulnerable.

Impact

The CVSS 8.2 score (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N) is technically accurate for the described impact: stored XSS with scope change (S:C) against a victim's browser origin, with high confidentiality impact (C:H) against cookies and session tokens. However, the real-world risk is substantially gated by deployment configuration - the vulnerable plugin is disabled by default and must be deliberately activated by the developer, which significantly narrows the affected population. Even a mid-sized municipal IT team in mielec would only be exposed if they explicitly enabled the script-removal plugin and relied on it as a sanitization mechanism, a use case the SVGO maintainers themselves discourage. No EPSS score was provided in the input data, leaving probabilistic exploitation estimates unquantifiable. No CISA KEV listing is present, so widespread active exploitation in the wild is unconfirmed at time of analysis. A publicly available proof-of-concept in the GHSA advisory materially elevates the threat for affected configurations by reducing attacker skill requirements. The overall risk is high for applications that explicitly configured SVGO as a sanitization step for untrusted SVG uploads, and negligible for the majority of SVGO consumers using it in build pipelines on trusted assets.

Exploit ScenarioDerived

An attacker submits a crafted SVG to a web application's file upload endpoint containing both a <svg:script>alert(document.cookie)</svg:script> element and a hyperlink with href="JavaScript:exfil()", knowing the application processes uploads with SVGO's removeScripts plugin enabled. SVGO optimizes the file but leaves both payloads intact due to the namespace-blindness and case-sensitivity flaws. When a victim user later opens or previews the stored SVG in their browser on the application's origin, the injected script executes and exfiltrates the victim's session cookies to an attacker-controlled endpoint. A functional proof-of-concept demonstrating both bypass techniques is published in the GitHub Security Advisory GHSA-2p49-hgcm-8545.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

Cross-site scripting in SVGO's script-removal plugin exposes web applications that process untrusted SVG uploads to stored XSS attacks across all major version lines from 1.0.0 through 4.0.1. The removeScripts plugin (called removeScriptElement in v1-3) silently passes through namespace-prefixed script elements such as <svg:script> and performs case-sensitive JavaScript URI matching that attackers trivially bypass with mixed-case variants like JavaScript:. Applications serving SVGO-optimized SVGs to end users face cookie and session token theft; patches are available in versions 2.8.3, 3.3.4, and 4.0.2, with a public proof-of-concept included in the GitHub security advisory GHSA-2p49-hgcm-8545.

RemediationAI

Upgrade SVGO to the patched releases: v2.8.3 for consumers on the v2 line (https://github.com/svg/svgo/releases/tag/v2.8.3), v3.3.4 for the v3 line (https://github.com/svg/svgo/releases/tag/v3.3.4), or v4.0.2 for the v4 line (https://github.com/svg/svgo/releases/tag/v4.0.2). For nested transitive dependencies, use yarn up -R svgo or npm update svgo --depth 10. If an immediate upgrade is not feasible, disable the removeScriptElement or removeScripts plugin entirely in your SVGO configuration - this eliminates the vulnerable code path with no impact on other optimization plugins. As a structural alternative, replace SVGO-based script removal with a dedicated SVG or HTML sanitization library such as DOMPurify, which the SVGO maintainers explicitly recommend since SVGO is not designed as a sanitization library; note that switching sanitizers may require integration work and testing of SVG rendering fidelity. Restricting SVG upload endpoints to authenticated and trusted users reduces the attacker's ability to inject malicious payloads but does not substitute for patching.

Affected VersionsENISA

svgo 1.0.0, < 2.8.3
svgo 3.0.0, < 3.3.4
svgo 4.0.0, < 4.0.2

Affected Packages

npm svgo fix: 2.8.3, 3.3.4, 4.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SVGO (npm package svgo, CPE: cpe:2.3:a:svg:svgo:*:*:*:*:*:*:*:*) is a Node.js SVG optimization library with a plugin architecture that parses and transforms SVG XML into an abstract syntax tree. The vulnerability maps to CWE-79 (Improper Neutralization of Input During Web Page Generation) through two distinct implementation flaws in the removeScriptElement/removeScripts plugin. First, the plugin's element-matching logic was not XML namespace-aware: SVG permits explicit namespace prefix declarations via xmlns:svg="http://www.w3.org/2000/svg", making <svg:script> semantically identical to <script> in a browser, but the plugin compared element names as plain strings and treated svg:script as an unknown, non-script tag. Second, JavaScript URI detection in href attributes used case-sensitive string comparison, allowing bypass via mixed-case schemes such as JavaScript: or jAvAsCrIpT:. The published commit diff shows the fix introduces a namespace-aware element resolution function (isNamespaceAwareElem) that tracks XML namespace prefix-to-URI mappings as a per-element stack during AST traversal, and extends URI matching to be case-insensitive.

Know when Svgo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
vuln.today AI 8.2 HIGH

Network-delivered stored XSS with scope change to victim browser; PR:N as upload endpoints typically require no elevated privilege; victim must open the SVG, so UI:R.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N
SUSE 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 19:04 EUVD
CVE Published
Aug 13, 2026 - 18:08 cve.org
HIGH 8.2

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on svgo (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.0.0.

Executive ViewAI

Why It Matters

SVGO, a widely-deployed SVG optimization library, contains a stored cross-site scripting vulnerability in its script-removal plugin affecting versions 1.0.0 through 4.0.1 that enables attackers to inject malicious scripts into SVG files processed by web applications. Organizations serving user-supplied or third-party SVGs face direct risk of session hijacking and credential theft affecting end users. With publicly available exploit code existing, urgent patching is required to prevent compromise.

Business Impact: High
Compensating Controls

Apply vendor patch: upgrade to version 2.8.3 (v2.x), 3.3.4 (v3.x), or 4.0.2 (v4.x). If immediate patching cannot be completed, implement interim mitigations: disable SVG upload and processing endpoints, enforce strict Content Security Policy headers, perform server-side SVG validation using an allowlist of safe elements and attributes, and route all user-supplied SVG content through a content security gateway that strips script elements and namespace prefixes before rendering to end users.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
High
top npm SVG optimizer, tens of millions of weekly downloads
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy