Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @dicebear/core
  4. ›
  5. CVE-2026-33311

CVE-2026-33311: SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials

March 19, 2026

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.

References

  • github.com/advisories/GHSA-mr9r-mww3-v6gv
  • github.com/dicebear/dicebear
  • github.com/dicebear/dicebear/security/advisories/GHSA-mr9r-mww3-v6gv
  • nvd.nist.gov/vuln/detail/CVE-2026-33311

Code Behaviors & Features

Detect and mitigate CVE-2026-33311 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.0.0 before 5.4.4, all versions starting from 6.0.0 before 6.1.4, all versions starting from 7.0.0 before 7.1.4, all versions starting from 8.0.0 before 8.0.3, all versions starting from 9.0.0 before 9.4.1

Fixed versions

  • 5.4.4
  • 6.1.4
  • 7.1.4
  • 8.0.3
  • 9.4.1

Solution

Upgrade to versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1 or above.

Impact 4.7 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@dicebear/core/CVE-2026-33311.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 20 Mar 2026 12:18:44 +0000.