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

CVE-2026-68921: DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)

September 2, 2026

@dicebear/core builds avatar SVGs from caller-supplied options. The numeric rotate option is interpolated into an SVG transform attribute without XML-escaping. It is typed as a number, but nothing checks the type at runtime, so a string value passes straight through and can break out of the attribute to inject arbitrary SVG markup.

This is the same root cause as CVE-2026-33311 (GHSA-mr9r-mww3-v6gv), which escaped the string options backgroundColor, fontFamily, and textColor but did not cover rotate. @dicebear/initials has the same gap in its numeric fontSize and fontWeight options.

References

  • github.com/advisories/GHSA-gcr2-9v8m-gq45
  • github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59
  • github.com/dicebear/dicebear/releases/tag/v9.4.3
  • github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45
  • nvd.nist.gov/vuln/detail/CVE-2026-68921

Code Behaviors & Features

Detect and mitigate CVE-2026-68921 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 before 9.4.3

Fixed versions

  • 9.4.3

Solution

Upgrade to version 9.4.3 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-184: Incomplete List of Disallowed Inputs
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@dicebear/initials/CVE-2026-68921.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Fri, 04 Sep 2026 12:17:12 +0000.