CVE-2026-33418
Published: 24 March 2026
Summary
CVE-2026-33418 is a high-severity Incorrect Regular Expression (CWE-185) vulnerability in Dicebear Dicebear. Its CVSS base score is 7.5 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked at the 19.6th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SC-5 (Denial-of-service Protection) and SI-10 (Information Input Validation).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Requires validation of SVG inputs to prevent bypass of size capping via crafted tags, directly addressing the root cause of oversized rendering.
Implements denial-of-service protections to mitigate out-of-memory crashes from rendering attacker-controlled oversized SVGs.
Ensures timely remediation of the library flaw by updating to version 9.4.2 with proper XML parsing and fitTo constraints.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Vulnerability enables remote exploitation of SVG rendering logic in a Node.js service to trigger OOM crashes via crafted input bypassing size checks, directly facilitating T1499.004 (Application or System Exploitation) for availability impact.
NVD 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…
more
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.
Deeper analysisAI
CVE-2026-33418 is a vulnerability in the DiceBear avatar library for designers and developers, affecting versions prior to 9.4.2. The issue lies in the `ensureSize()` function of the `@dicebear/converter` package, which uses a regex-based approach to cap SVG `width` and `height` attributes at 2048px to mitigate denial-of-service risks. This capping mechanism can be bypassed by supplying crafted SVG input containing a non-functional `<svg` tag before the actual SVG root element, allowing the root element's oversized dimensions to persist.
Remote attackers can exploit this vulnerability without authentication or user interaction by providing malicious SVG input to a DiceBear instance on the Node.js code path, where it is rendered via `@resvg/resvg-js`. Successful exploitation causes the SVG to render at attacker-controlled dimensions, potentially triggering out-of-memory crashes and high availability impact. The CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) reflects network accessibility, low attack complexity, and no privileges required, mapped to CWE-185 (Incorrect Regular Expression).
The GitHub security advisory (GHSA-7j2x-32w6-p43p) details mitigation in version 9.4.2, which replaces the regex-based processing with XML-aware parsing using `fast-xml-parser` to accurately target and modify the SVG root element's attributes. As a defense-in-depth measure, a `fitTo` constraint was added to the `renderAsync` call, bounding the rendered output regardless of SVG content.
Details
- CWE(s)