Hoch

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

  • Veröffentlicht: 08.09.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

SVGO's opt-in removeScripts plugin failed to remove some executable links. Namespace-prefixed SVG anchors and URL schemes containing ASCII tabs or newlines could bypass its checks. Applications that used this plugin as their only protection for untrusted SVG input could expose users to cross-site scripting (XSS).

SVGO is an optimizer rather than a comprehensive sanitization library, but removeScripts is maintained for consumers that already rely on it to remove common script execution paths.

Details

Two related bypasses were present:

  1. The plugin inspected unprefixed SVG <a> elements but did not recognize namespace-prefixed SVG anchors such as <svg:a> when the prefix was bound to the SVG namespace. Their executable href or namespaced *:href values remained intact.
  2. The URL check did not account for ASCII tab, line-feed, or carriage-return characters embedded in a scheme. Browsers remove these characters before parsing the scheme, so values such as java&#9;script: could remain executable after bypassing the plugin's javascript: check.

Anchors in unrelated custom namespaces are not executable SVG anchors and remain untouched.

Impact

If an application optimized attacker-controlled SVGs with removeScripts and then served the result in an active browser context, a victim could follow a link that executes script in the SVG's origin. Depending on the embedding and origin configuration, this could expose cookies or local storage, modify content, or perform actions as the victim.

The plugin is opt-in, so consumers that do not enable it are not relying on the affected behavior. Typical local optimization of trusted SVG files is not affected.

Patches

Upgrade to one of the following releases for the maintained release line in use:

Release line Patched version Plugin
v2 2.8.4 removeScriptElement
v3 3.3.5 removeScriptElement
v4 4.1.0 removeScripts

The fix makes SVG anchor handling namespace-aware and strips ASCII tabs, line feeds, and carriage returns before checking executable URL schemes.

SVGO v1 is no longer maintained. Users of v1 should upgrade to a supported release line.

Workarounds

For hostile input, use a dedicated SVG sanitization tool before passing the SVG to SVGO. Applications can also reject links from untrusted SVG input and avoid serving user-controlled SVGs in an active same-origin context.

References

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket svgo >= 1.0.0, < 2.8.4, >= 3.0.0, < 3.3.5, >= 4.0.0, < 4.1.0 2.8.4, 3.3.5, 4.1.0

Verweise

CVSS-Wert 8.2/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Schwäche (CWE)
CWE-184, CWE-79
Plattform
npm
Paket
svgo
Veröffentlicht
08.09.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-w27v-7q3p-w38r - CC BY 4.0

Schwachstellenhistorie: svgo

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
4
Erste → letzte
03.2026 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 3
  • Mittel 1

Veröffentlichungen pro Jahr

  1. 2026: 4
  1. SVGO: removeScripts allows executable links through namespace and control-character bypasses dieser Eintrag
    Hoch · 8.2 CVE-2026-84370 >= 1.0.0, < 2.8.4, >= 3.0.0, < 3.3.5, >= 4.0.0, < 4.1.0 2.8.4, 3.3.5, 4.1.0
  2. Mittel · 6.1 CVE-2026-84369 >= 1.0.0, < 2.8.4, >= 3.0.0, < 3.3.5, >= 4.0.0, < 4.1.0 2.8.4, 3.3.5, 4.1.0
  3. Hoch · 8.2 CVE-2026-73650 >= 1.0.0, < 2.8.3, >= 3.0.0, < 3.3.4, >= 4.0.0, < 4.0.2 2.8.3, 3.3.4, 4.0.2
  4. Hoch · 7.5 CVE-2026-29074 >= 2.1.0, < 2.8.1, >= 3.0.0, < 3.3.3, >= 4.0.0, < 4.0.1 2.8.1, 3.3.3, 4.0.1

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.