Cross-site scripting in dicebear
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
DiceBear is an avatar library for designers and developers. Prior to 9.4.3, @dicebear/core interpolates the rotate option into an SVG transform attribute without XML escaping in addRotate in packages/@dicebear/core/src/utils/svg.ts, while @dicebear/initials similarly emits fontSize and fontWeight without escaping in packages/@dicebear/initials/src/index.ts. Runtime callers can pass strings despite the numeric TypeScript types, break out of the attributes, and inject arbitrary SVG markup. Script can execute in the page origin when the generated avatar is inserted inline or served as image/svg+xml and opened directly, although exploitation requires an application to pass untrusted values into these normally developer-controlled options. This issue is fixed in @dicebear/core and @dicebear/initials version 9.4.3.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| dicebear | dicebear | before 9.4.3 | 9.4.3 | Patch available | CNA |
| — | @dicebear/core (npm) | before 9.4.3 | 9.4.3 | Patch available | GHSA-gcr2-9v8m-gq45 |
| — | @dicebear/initials (npm) | before 9.4.3 | 9.4.3 | Patch available | GHSA-gcr2-9v8m-gq45 |
- dicebear Vendordicebear Affected before 9.4.3 Fixed in 9.4.3 Patch available CNA
- @dicebear/core (npm) Vendor— Affected before 9.4.3 Fixed in 9.4.3 Patch available GHSA-gcr2-9v8m-gq45
- @dicebear/initials (npm) Vendor— Affected before 9.4.3 Fixed in 9.4.3 Patch available GHSA-gcr2-9v8m-gq45
Remediation
- Fix · CNA dicebear (dicebear) Fixed in 9.4.3
- Fix · GHSA-gcr2-9v8m-gq45 @dicebear/core (npm) Fixed in 9.4.3 Advisory →
- Fix · GHSA-gcr2-9v8m-gq45 @dicebear/initials (npm) Fixed in 9.4.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-68921
- 2026-10-03 Alias added: GHSA-gcr2-9v8m-gq45
References
More dicebear vulnerabilities
- TI-2026-25815 @dicebear/converter ensureSize() Vulnerable to SVG Dimension Capping Bypass via XML Comment Injection CVSS 3.1HIGH 7.5
- TI-2026-23253 @dicebear/converter vulnerable to ncontrolled memory allocation via crafted SVG dimensions CVSS 3.1HIGH 7.5
- TI-2026-25722 @dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options CVSS 3.1MEDIUM 4.7
Sources
- CVE-2026-68921 · CVE Program
- CVE-2026-68921 · NVD
- FIRST EPSS
- GHSA-gcr2-9v8m-gq45 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences