Mittel

SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials

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

Summary

SVG attribute values derived from user-supplied options (backgroundColor, fontFamily, textColor) were not XML-escaped before interpolation into SVG output. This could allow Cross-Site Scripting (XSS) when applications pass untrusted input to createAvatar() and serve the resulting SVG inline or with Content-Type: image/svg+xml.

Affected packages

  • @dicebear/core — backgroundColor option values interpolated into SVG attributes without escaping (affects solid and gradientLinear background types)
  • @dicebear/initials — fontFamily and textColor option values interpolated into SVG attributes without escaping

Fix

All affected SVG attribute values are now properly escaped using XML entity encoding. Users should upgrade to the listed patched versions.

Mitigating factors

  • Applications that validate input against the library's JSON Schema before passing it to createAvatar() are not affected
  • The DiceBear CLI validates input via AJV and was not vulnerable
  • Exploitation requires that an application passes untrusted, unvalidated external input directly as option values

Betroffene Software

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

PlattformPaketAnfällige VersionenBehoben in
npm-Paket @dicebear/core >= 5.0.0, < 5.4.4, >= 6.0.0, < 6.1.4, >= 7.0.0, < 7.1.4, >= 8.0.0, < 8.0.3, >= 9.0.0, < 9.4.1 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1
npm-Paket @dicebear/initials >= 5.0.0, < 5.4.4, >= 6.0.0, < 6.1.4, >= 7.0.0, < 7.1.4, >= 8.0.0, < 8.0.3, >= 9.0.0, < 9.4.1 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1

Verweise

CVSS-Wert 4.7/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Schwäche (CWE)
CWE-79
Plattform
npm
Paket
@dicebear/core, @dicebear/initials
Veröffentlicht
19.03.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-mr9r-mww3-v6gv - CC BY 4.0

Schwachstellenhistorie: @dicebear/core

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
2
Erste → letzte
03.2026 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Mittel 2

Veröffentlichungen pro Jahr

  1. 2026: 2
  1. SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials dieser Eintrag
    Mittel · 4.7 CVE-2026-33311 >= 5.0.0, < 5.4.4, >= 6.0.0, < 6.1.4, >= 7.0.0, < 7.1.4, >= 8.0.0, < 8.0.3, >= 9.0.0, < 9.4.1 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.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.