# CVE-2026-68921: DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)

- Severity: Medium 4.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2026-08-20T21:08:43.813Z
- Modified: 2026-10-26T10:10:00.140Z
- Also known as: GHSA-gcr2-9v8m-gq45
- Weaknesses: CWE-79, CWE-184
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dicebear dicebear: < 9.4.3
- @dicebear/core (npm): before 9.4.3
- @dicebear/initials (npm): before 9.4.3

## Every score

- GitHub_M: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45> (web)
- <https://github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59> (web)
- <https://github.com/dicebear/dicebear/releases/tag/v9.4.3> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-68921> (advisory)
- <https://github.com/dicebear/dicebear> (package)

## Sources

- CVE List: [CVE-2026-68921](https://www.cve.org/CVERecord?id=CVE-2026-68921), CVE Terms of Use, modified 2026-08-21
- GitHub Advisory Database: [GHSA-gcr2-9v8m-gq45](https://github.com/advisories/GHSA-gcr2-9v8m-gq45), CC-BY-4.0, modified 2026-09-17
- NVD: [CVE-2026-68921](https://nvd.nist.gov/vuln/detail/CVE-2026-68921), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-68921 · Whole record: https://cve.day/CVE-2026-68921.json · Rebuilt by cve.day 2026-11-25T22:59:34.704Z
