CVE-2026-33418: @dicebear/converter SVG Dimension Capping Bypass Vulnerability
Summary
CVE-2026-33418: SVG Dimension Capping Bypass via XML Comment Injection in @dicebear/converter ensureSize(). Affects @dicebear/converter versions < 9.4.2. Fixed in 9.4.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @dicebear/converter package is a tool used for converting SVG content into various image formats such as PNG, JPEG, WebP, and AVIF. It is widely utilized in applications that require dynamic image generation from SVG input. However, due to its reliance on regex for processing SVG dimensions, it is susceptible to a vulnerability that can lead to denial of service through excessive memory allocation.
Vulnerability Detail
The vulnerability arises from the ensureSize() function in @dicebear/converter, which uses a regex-based method to cap SVG width and height attributes at 2048px. An attacker can exploit this by injecting crafted SVG input that causes the regex to match a non-functional occurrence of <svg> before the actual SVG root element. This allows the actual SVG dimensions to remain uncapped, leading to potential out-of-memory crashes when rendered in Node.js. The vulnerability is classified as high severity with a CVSS score of 7.5, and it primarily affects the availability of the application without compromising data integrity or confidentiality.
How To Fix
Minimum fixed version
9.4.2
This is the first release that contains the fix.
npm install @dicebear/converter@9.4.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid passing untrusted or user-supplied SVG content to the Node.js conversion functions of @dicebear/converter until the package is updated. This can help mitigate the risk of denial of service.
Conclusion
The CVE-2026-33418 vulnerability in @dicebear/converter poses a significant risk due to its potential for denial of service through unbounded memory allocation. It is crucial for users of this package to update to version 9.4.2 or later to ensure their applications are secure. For real-time monitoring of open-source vulnerabilities, consider using Vulert, which can alert you to issues without requiring code access.
See every vulnerability recorded for @dicebear/converter →
FAQ
The vulnerability allows attackers to bypass SVG dimension capping, leading to potential denial of service through excessive memory usage.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score of this vulnerability is 7.5, indicating a high severity level.
No, the vulnerability primarily affects availability and does not lead to data disclosure or integrity issues.
If you cannot update the package, avoid using untrusted SVG content in your application to mitigate the risk.
References
Related vulnerabilities
Recent vulnerabilities recorded for @dicebear/converter.