{"id":"CVE-2026-68921","published":"2026-08-20T21:08:43Z","modified":"2026-08-21T11:32:29Z","title":"DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in…","vendor":"dicebear","product":"dicebear","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.7,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00286,"percentile":0.21618,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"}],"references":[{"url":"https://github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59","tags":["x_refsource_MISC"]},{"url":"https://github.com/dicebear/dicebear/releases/tag/v9.4.3","tags":["x_refsource_MISC"]}],"priority":{"score":7.6,"factors":[{"name":"EPSS percentile","points":4.32},{"name":"CVSS severity","points":3.29}]},"vendorSlug":"dicebear","affectedVersions":[{"vendor":"dicebear","product":"dicebear","versions":["< 9.4.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-21T11:32:11.648752Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@dicebear/core","vulnerableRanges":["<9.4.3"],"patched":["9.4.3"],"from":["GHSA-gcr2-9v8m-gq45"],"provenance":"source"},{"ecosystem":"npm","package":"@dicebear/initials","vulnerableRanges":["<9.4.3"],"patched":["9.4.3"],"from":["GHSA-gcr2-9v8m-gq45"],"provenance":"source"}],"summary":{"text":"The DiceBear avatar library's @dicebear/core package, and its @dicebear/initials package, fail to XML-escape the rotate, fontSize, and fontWeight options when building SVG output, so string values passed at runtime can break out of attributes and inject arbitrary SVG markup. An attacker could get script to run in the page origin if an application passes untrusted values into these options and the generated avatar is inserted inline or opened directly as image/svg+xml, which requires user interaction and a developer-controlled path that forwards attacker-supplied input.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:00Z"},"euvd":{"id":"EUVD-2026-63657","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-33311","published":"2026-03-24","fixed":"9.4.1","kev":false,"link":{"from":"CVE-2026-33311","to":"CVE-2026-68921","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@dicebear/core","fromFixed":"9.4.1","toFixed":"9.4.3","daysApart":149},{"kind":"version-step","provenance":"source","package":"npm:@dicebear/initials","fromFixed":"9.4.1","toFixed":"9.4.3","daysApart":149},{"kind":"similar","provenance":"machine","score":0.39,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-68921","published":"2026-08-20","fixed":"9.4.3","kev":false}],"package":"npm:@dicebear/core"}}