CVE-2026-33311 Details
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.
A vulnerability in the DiceBear avatar library, affecting versions 5.0.0 prior to 5.4.4, 6.0.0 prior to 6.1.4, 7.0.0 prior to 7.1.4, 8.0.0 prior to 8.0.3, and 9.0.0 prior to 9.4.1, allows for Cross-Site Scripting (XSS) attacks. The issue arises because SVG attribute values derived from user-supplied options, such as backgroundColor, fontFamily, and textColor, were not properly escaped before being interpolated into SVG output. This vulnerability can be exploited when applications pass untrusted input to the createAvatar() function and serve the resulting SVG inline or with a Content-Type of image/svg+xml. However, applications that validate input against the library's JSON Schema before using createAvatar() are not affected. The DiceBear CLI, which also validates input, was not vulnerable.
Users should upgrade to DiceBear versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, or 9.4.1, where the vulnerability has been patched. For applications using the DiceBear CLI, no action is needed as it was not vulnerable.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/dicebear/dicebear/security/advisories/GHSA-mr9r-mww3-v6gv | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| 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 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 24, 2026 | Initial Analysis | [email protected] |
| Mar 24, 2026 | New CVE Received | [email protected] |