CVE Catalog

CVE-2026-68921

MediumCVSS 4.7
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.22%

13th percentile - higher than 13% of all known CVEs

Summary

In DiceBear before version 9.4.3, the rotate, fontSize, and fontWeight options are interpolated into SVG attributes without proper XML escaping. This allows injection of arbitrary SVG markup, which can lead to script execution in the page origin if the generated avatar is embedded inline or opened as an image.

Risk Assessment

The vulnerability could allow an attacker to inject malicious SVG code, potentially leading to XSS attacks if the application passes untrusted values to these options.

Recommendation

It is recommended to upgrade @dicebear/core and @dicebear/initials to version 9.4.3 or later, which includes a fix.

Related vulnerabilities

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS