DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)
CVE-2026-68921GHSA-gcr2-9v8m-gq45
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (@dicebear/initials 9.4.3; @dicebear/core 9.4.3), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- <= 9.4.2
- Fixed in
- 9.4.3
npm @dicebear/core
- Affected
- <= 9.4.2
- Fixed in
- 9.4.3
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-gcr2-9v8m-gq45 lists affected ranges: npm @dicebear/core >=0 =0 <=9.4.2
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 4.7 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS
- CVE-2026-68921: 0.29% estimated exploitation activity in the next 30 days; percentile 21.19 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary @dicebear/core builds avatar SVGs from caller-supplied options. The numeric rotate option is interpolated into an SVG transform attribute without XML-escaping. It is typed as a number, but nothing checks the type at runtime, so a string value passes straight through and can break out of the attribute to inject arbitrary SVG markup. This is the same root cause as CVE-2026-33311 (GHSA-mr9r-mww3-v6gv), which escaped the string options backgroundColor, fontFamily, and textColor but did not cover rotate. @dicebear/initials has the same gap in its numeric fontSize and fontWeight options. Impact Cross-site scripting (CWE-79). When the generated avatar is rendered inline (for example via innerHTML) or served as image/svg+xml and opened directly, injected markup such as an <image onerror handler runs script in the page's origin. Exploitation requires the application to pass untrusted input into one of these options: - rotate (@dicebear/core) - fontSize, fontWeight (@dicebear/initials)…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-gcr2-9v8m-gq45
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2026-68921 Advisory: DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials) IDs: CVE-2026-68921, GHSA-gcr2-9v8m-gq45 Record: https://patchnext.com/advisories/cve-2026-68921 (revision 1, source checked 26 Oct 2026, 13:02 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 4.7) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: @dicebear/initials 9.4.3; @dicebear/core 9.4.3. A vendor fix does not mean a deployment is fixed. ## Affected components - npm @dicebear/initials: affected <= 9.4.2; fixed in 9.4.3 - npm @dicebear/core: affected <= 9.4.2; fixed in 9.4.3 ## Suggested inspection (read-only) - `npm ls @dicebear/initials --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. - `npm ls @dicebear/core --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on @dicebear/initials, @dicebear/core. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-gcr2-9v8m-gq45 (GitHub-reviewed advisory GHSA-gcr2-9v8m-gq45 lists affected ranges: npm @dicebear/core >=0 =0 <=9.4.2) Commands are suggestions: review each one before running it.
Loading voting…