Skip to main content
VulnerabilityPublished

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

Affects @dicebear/coreSource GCVE Database

0
Compare
Authoritative record:CVE-2026-68921· Medium 4.7

Not known to be exploited · CVSS 4.7 Medium : upgrade to 9.4.3 when convenient.

Data as of 3 Dec 2026, 18:37 UTC

CVSS 3.1 base score
4.7Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 13% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 9.4.3
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.

What to do

Upgrade @dicebear/core and @dicebear/initials to 9.4.3.

Affected software

ProductAffectedFixed in
npm@dicebear/coreAffected
  • <9.4.3
Fixed in
  • 9.4.3
npm@dicebear/initialsAffected
  • <9.4.3
Fixed in
  • 9.4.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in @dicebear/core and @dicebear/initials version 9.4.3 and later, which applies XML escaping to the affected options. Users should upgrade to version 9.4.3 or newer. The 5.x through 8.x versions are end-of-life and will not receive patches; upgrading is recommended. If upgrading is not possible, a workaround is to coerce the affected options to numbers before passing them to createAvatar, for example: rotate: Number(userInput) || 0.

Description

A vulnerability in @dicebear/core and @dicebear/initials allows SVG injection via unescaped numeric options that are not properly type-checked at runtime. Specifically, the rotate option in @dicebear/core and fontSize/fontWeight options in @dicebear/initials can be exploited to inject arbitrary SVG markup leading to cross-site scripting (XSS). This occurs because these options are interpolated into SVG transform attributes without XML escaping. The flaw is fixed in version 9.4.3 and later.

References

Community reviews

Loading reviews…