CVE-2026-33418 Details
Description
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.
A denial-of-service vulnerability has been identified in the DiceBear avatar library, specifically in the @dicebear/converter package, prior to version 9.4.2. The issue arises in the ensureSize() function, which originally employed a regex-based method to adjust SVG width and height attributes, limiting them to 2048 pixels to avert denial-of-service conditions. However, this restriction could be circumvented by creating SVG input that tricks the regex into matching a non-functional instance of '<svg' before the actual root element. When the SVG is rendered using @resvg/resvg-js' on the Node.js path, it adheres to the dimensions specified by the attacker, potentially leading to out-of-memory crashes. In version 9.4.2, the library updated its approach to use XML-aware processing with fast-xml-parser, allowing for accurate identification and modification of SVG attributes, and added a fitTo constraint in the rendering process to ensure output is always within safe limits.
Users can upgrade to @dicebear/converter version 9.4.2 or later, where this vulnerability has been addressed. Instructions for updating can be found on the DiceBear GitHub repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 24, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/dicebear/dicebear/security/advisories/GHSA-7j2x-32w6-p43p | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-185 | Incorrect Regular Expression | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| dicebear dicebear | < 9.4.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 24, 2026 | Initial Analysis | [email protected] |
| Mar 24, 2026 | New CVE Received | [email protected] |