CVE-2026-68921 DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
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.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| dicebear @dicebear/core(npm) | < 9.4.3; <= 9.4.2 | 9.4.3 | Fixed |
| dicebear @dicebear/initials(npm) | < 9.4.3; <= 9.4.2 | 9.4.3 | Fixed |
| dicebear | = < 9.4.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| dicebear | = < 9.4.3 | No fix listed |
| dicebear @dicebear/core(npm) | <= 9.4.2 | No fix listed |
| dicebear @dicebear/initials(npm) | <= 9.4.2 | No fix listed |
| dicebear @dicebear/core(npm) | < 9.4.3 | 9.4.3 |
| dicebear @dicebear/initials(npm) | < 9.4.3 | 9.4.3 |
References
- https://github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45 vendor-advisory
- https://github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59 patch
- https://github.com/dicebear/dicebear/releases/tag/v9.4.3
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product
- ENISA EUVD EUVD-2026-63657 third-party-advisory