Vulnerabilities/

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:

References

Related Issues

Tags:
npm
@dicebear/converter
Anything's wrong? Let us know Last updated on March 25, 2026