ADVISORIES

Vulnerability

CVE-2026-68921

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.

5 advisories report this vulnerability, across 2 ecosystems.

Medium severity All Chainguard 4npm 1

Advisories

  • CGA-4mg7-6vvv-hfg8
    CVE-2026-68921 Chainguard Updated 5 November 2026
  • CGA-7494-jj9m-mcgc
    CVE-2026-68921 Chainguard Updated 5 November 2026
  • CGA-hpjh-f6c3-vw5h
    CVE-2026-68921 Chainguard Updated 5 November 2026
  • CGA-q42x-v9v3-2g8x
    CVE-2026-68921 Chainguard Updated 5 November 2026
  • GHSA-gcr2-9v8m-gq45

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

    Moderate CVE-2026-68921 npm Updated 17 September 2026

References