CVE-2026-33311
published medium CVSS 3.1 · 4.7@dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| dicebear | — | dicebear>= 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 | Affected | Not stated | GitHub_M |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.7 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| dicebear | dicebear | >= 5.0.0, < 5.4.4 (affected)>= 6.0.0, < 6.1.4 (affected)>= 7.0.0, < 7.1.4 (affected)>= 8.0.0, < 8.0.3 (affected)>= 9.0.0, < 9.4.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
1Provider assertions
2GitHub_M · cna
@dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 4ba05e024ee2afc9611b30e84fb9b4e666f883a8fa13fdcc69349c0bece05927
- Ingested
- 23 Sep 2026, 09:10:36 UTC
- Source record
- Official CVE record