CVE-2026-68921
MEDIUM 4.7CVSS 3.1DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)
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.
- Published
- 20 Aug 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-184CWE-79
- Also known as
- GHSA-gcr2-9v8m-gq45
- Sources
- NVDJSONOSV GHSA-gcr2-9v8m-gq45JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | @dicebear/core | < 9.4.3 | 9.4.3 |
| OSV | npm | @dicebear/initials | < 9.4.3 | 9.4.3 |
References
- https://github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59 · WEB
- https://github.com/dicebear/dicebear/releases/tag/v9.4.3 · WEB
- https://github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-68921 · ADVISORY
- https://github.com/dicebear/dicebear · PACKAGE
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 20 Aug 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Sep 2026)