Cross-Site Scripting (XSS) in svgo (CVE-2026-73650)
Summary
Cross-site scripting in svgo (CVE-2026-73650). Confidential information can be exposed externally. Exploitable via script. Mitigation: upgrade to 4.0.2 or later.
Original description
The description as published by the source.
Summary
SVGO's removeScripts plugin (disabled by default) removes scripts from the SVG, however executable scripts were left intact in some cases. If a consumer relied on this plugin for sanitization and served them to users, these SVGs could open up doors to XSS.
Details
SVGO has a plugin for removing scripts from an SVG, which removes:
- `` elements
- JavaScript URIs (v4 and v3 only)
on…event handlers (v4 and v3 only)
While SVGO is not a sanitization library, SVGO continues to maintain the plugin for those already using it for this purpose.
However, there were two problems:
- SVGO did not check namespaced/prefixed
scriptelements, for example if one declared an explicit prefix for the SVG namespace () instead of using the default namespace (), the `` tag would be left intact. - SVGO case sensitively matched JavaScript URIs, but it should've been case-insensitive.
Proof of Concept
import { optimize } from 'svgo';
/** Presume that this string was obtained in some other way, such as network. */
const original = `
uwu
alert(document.cookie);
`;
optimize(original, {
plugins: ['removeScripts']
});
// Did not remove or uwu:href="JavaScript:…—still executed by browsers.
Impact
If you run SVGO on untrusted input (e.g., user uploads to a web application) and you depended on removeScripts, then some scripts may still be present. If that SVG was then opened directly by another user on the same domain, it…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-73650 has been found in svgo.
Attackers can target a specific entry point like script over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.2/10.
What to do: upgrade svgo to 4.0.2 or later.
If unsure, ask your IT team or search "svgo CVE-2026-73650" on the vendor's site.
CVE-2026-73650 (svgo) — CWE-79 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: script
Patched: 4.0.2 — apply immediately
Workaround: If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in svgo. Attackers reach the vulnerable code path via script without authentication.
Check the vendor advisory for the affected versions of svgo. Attack surface: script.
Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.
Update to 4.0.2.
Workaround: If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'svgo' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'svgo' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
svgoを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO.パッチが適用されるまでの応急処置として、If your motivation for enabling the plugin is SVG sanitization, consider reaching for a dedicated SVG sanitization tool and invoke it before passing the SVG to SVGO. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade svgo to 4.0.2ステージング環境で 4.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-73650 node-svgo Fixed in: 3.3.5+ds-1