Read the docs
TI-2026-25815 Aliases CVE-2026-33418GHSA-7j2x-32w6-p43p

@dicebear/converter ensureSize() Vulnerable to SVG Dimension Capping Bypass via XML Comment Injection

Priority LOW 39CWE-185Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

DiceBear is an avatar library for designers and developers. Prior to version 9.4.2, the `ensureSize()` function in `@dicebear/converter` used a regex-based approach to rewrite SVG `width`/`height` attributes, capping them at 2048px to prevent denial of service. This size capping could be bypassed by crafting SVG input that causes the regex to match a non-functional occurrence of `<svg` before the actual SVG root element. When the SVG is subsequently rendered via `@resvg/resvg-js` on the Node.js code path, it renders at the attacker-specified dimensions, potentially causing out-of-memory crashes. In version 9.4.2, the regex-based approach has been replaced with XML-aware processing using `fast-xml-parser` to correctly identify and modify the SVG root element's attributes. Additionally, a `fitTo` constraint has been added to the `renderAsync` call as defense-in-depth, ensuring the rendered output is always bounded regardless of SVG content.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00382 32nd percentileScored 2026-11-07
Fix Fixed dicebear (dicebear): 9.4.2@dicebear/converter (npm): 9.4.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
dicebeardicebearbefore 9.4.29.4.2Patch availableCNA
—@dicebear/converter (npm)before 9.4.29.4.2Patch availableGHSA-7j2x-32w6-p43p
  • dicebear Vendordicebear Affected before 9.4.2 Fixed in 9.4.2 Patch available CNA
  • @dicebear/converter (npm) Vendor— Affected before 9.4.2 Fixed in 9.4.2 Patch available GHSA-7j2x-32w6-p43p

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:*before 9.4.2Vulnerabledicebear
  • cpe:2.3:a:dicebear:dicebear:*:*:*:*:*:*:*:* Versions before 9.4.2 Vulnerable ·dicebear

Remediation

  • Fix · CNA dicebear (dicebear) Fixed in 9.4.2
  • Fix · GHSA-7j2x-32w6-p43p @dicebear/converter (npm) Fixed in 9.4.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-33418
  2. 2026-10-03 Alias added: GHSA-7j2x-32w6-p43p

References

  • TI-2026-23253 @dicebear/converter vulnerable to ncontrolled memory allocation via crafted SVG dimensions CVSS 3.1HIGH 7.5
  • TI-2026-25722 @dicebear/core and @dicebear/initials Vulnerable to SVG Injection via Unsanitized Options CVSS 3.1MEDIUM 4.7

Sources