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
Could your website be exposed too?
SmartScanner can check your website for SVG Dimension Capping Bypass via XML Comment Injection in @dicebear/converter ensureSize() and gives you actionable findings to investigate.
Start a free scanRelated 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


