CVE-2026-33311 | @dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options

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.

Published: 2026-03-24 Last update: 2026-03-24 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-33311 is rated Low Risk (21.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2026-33311

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-25 0.03%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-33311

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.7 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 2.7 [email protected]

Weakness enumeration for CVE-2026-33311

GitHub Security Advisory for CVE-2026-33311

GHSA-mr9r-mww3-v6gv · Severity: medium · Ecosystem: npm — SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials

Affected software / configurations for CVE-2026-33311

Vendor Product Version Raw CPE
dicebear dicebear >= 5.0.0, < 5.4.4 cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*
dicebear dicebear >= 6.0.0, < 6.1.4 cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*
dicebear dicebear >= 7.0.0, < 7.1.4 cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*
dicebear dicebear >= 8.0.0, < 8.0.3 cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*
dicebear dicebear >= 9.0.0, < 9.4.1 cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*

References for CVE-2026-33311

cvelogic Threat Intelligence