Skip to content
Fencer Intel
medium 4.7

CVE-2026-33311 json

@dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options

published 7mo ago modified last mo. also GHSA-mr9r-mww3-v6gv , EUVD-2026-20088

cvss
4.7
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 8%
public exploits
0
none known

Summary

DiceBear is an avatar library for designers and developers. Starting in version 5.0.0 and prior to versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, and 9.4.1, 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`. Starting in versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, and 9.4.1, all affected SVG attribute values are properly escaped using XML entity encoding. Users should upgrade to the listed patched versions. Some mitigating factors limit vulnerability. 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.

Patch / fix

  • npm @dicebear/core 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1
  • npm @dicebear/initials 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1
  • dicebear dicebear 5.4.4, 6.1.4, 7.1.4, 8.0.3, 9.4.1

Is CVE-2026-33311 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
7mo ago

Exploit prediction

0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 3.1 4.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub 3.1 4.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
npm @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 @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

Affected products

  • dicebear dicebear

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.