PoC Monitor
← All CVEs
CVE-2026-33418published 24 Mar 2026 13:25 UTCData: JSON · API

Dicebear

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

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by CNA · CWE-185
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

dicebear dicebear
  • < 9.4.2

Fixed in 9.4.2

Mitigation

Upgrade dicebear to 9.4.2 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published24 Mar 2026 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.