SVG Dimension Capping Bypass via XML Comment Injection in @dicebear/converter ensureSize()
- Severity:
- High
Description
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.
Recommendation
Update the @dicebear/converter package to the latest compatible version. Followings are version details:
- Affected version(s): <= 9.4.1
- Patched version(s): 9.4.2
References
Related Issues
- Uncontrolled memory allocation via crafted SVG dimensions in @dicebear/converter - CVE-2026-29112
- fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names - CVE-2026-25896
- fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters - CVE-2026-41650
- SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials - CVE-2026-33311
You might also like:
- Tags:
- npm
- @dicebear/converter
Anything's wrong? Let us know Last updated on March 25, 2026


