CVE-2026-68921
Received Received - Intake

Stored XSS in DiceBear Avatar Library via SVG Transform Attributes

Vulnerability report for CVE-2026-68921, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-20

Last updated on: 2026-08-20

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-20
Last Modified
2026-08-20
Generated
2026-08-21
AI Q&A
2026-08-21
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
dicebear core to 9.4.3 (inc)
dicebear initials to 9.4.3 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-184 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

DiceBear is an avatar library where versions before 9.4.3 have a flaw in SVG attribute handling. The library interpolates certain options like rotate, fontSize, and fontWeight into SVG attributes without proper XML escaping. This allows attackers to inject arbitrary SVG markup by passing untrusted strings, potentially breaking out of intended attributes.

Detection Guidance

Detection requires checking if your system uses vulnerable versions of @dicebear/core or @dicebear/initials (prior to 9.4.3). Inspect package.json or run npm list @dicebear/core @dicebear/initials to verify installed versions.

Impact Analysis

If an application uses DiceBear and passes untrusted input to these options, attackers could inject malicious SVG markup. This could lead to script execution in the page origin if the avatar is rendered inline or served as an SVG file opened directly. The impact includes potential data theft or unauthorized actions on behalf of the user.

Compliance Impact

This vulnerability could lead to cross-site scripting (XSS) attacks, which may result in unauthorized access to user data. For GDPR, this could violate principles of data protection and user consent. For HIPAA, it might compromise protected health information if exploited in healthcare applications.

Mitigation Strategies

Upgrade @dicebear/core and @dicebear/initials to version 9.4.3 or later. If using npm, run npm update @dicebear/core @dicebear/initials. Review applications passing untrusted input to these libraries.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-68921. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart