---
id: CVE-2026-68921
title: DiceBear is an avatar library for designers and developers
summary: >-
  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,
  whil…
severity: medium
cvss: 4.7
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-79
  - CWE-184
vendor: dicebear
product: '@dicebear/core'
affected:
  - '@dicebear/core <= 9.4.2'
  - '@dicebear/initials <= 9.4.2'
patched:
  - '@dicebear/core 9.4.3'
  - '@dicebear/initials 9.4.3'
published: '2026-08-20'
updated: '2026-09-18'
sourceUpdated: '2026-09-18T20:09:01.757'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-68921'
references:
  - url: >-
      https://github.com/dicebear/dicebear/commit/922946d738c4e77ab6c412e27ede75941fec4b59
    label: security-advisories@github.com
  - url: 'https://github.com/dicebear/dicebear/releases/tag/v9.4.3'
    label: security-advisories@github.com
  - url: >-
      https://github.com/dicebear/dicebear/security/advisories/GHSA-gcr2-9v8m-gq45
    label: security-advisories@github.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-68921'
  - url: 'https://github.com/advisories/GHSA-gcr2-9v8m-gq45'
tags:
  - nvd
  - ghsa
  - npm
epss: 0.00286
epssPercentile: 0.18826
aliases:
  - GHSA-gcr2-9v8m-gq45
ecosystem: npm
ingestedAt: '2026-09-02T22:51:44.285Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-68921)

Affected packages:

- `@dicebear/core <= 9.4.2`
- `@dicebear/initials <= 9.4.2`

Patched in:

- `@dicebear/core 9.4.3`
- `@dicebear/initials 9.4.3`

Source: https://github.com/advisories/GHSA-gcr2-9v8m-gq45
