CVE-2026-33418
Dicebear ≤ 9.4.2
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HSummary
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 Command and Scripting Interpreter (T1059); ranked at the 31th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-15 (Development Process, Standards, and Tools) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
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.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-14875
Vulnerability Data
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and evaluation can discover regex that fails to match or compare data as intended.
Requiring documented development standards and tools reduces the chance that incorrect regular expressions are written into validation or filtering logic.
An SDLC that incorporates security can embed reviews or tooling that catch malformed regular expressions before deployment.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly require correct regex design, testing, and review to avoid improper matching.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing in development can detect regex-related flaws before release.
Secure development lifecycle includes validation of input-handling constructs such as regex.
Application security requirements can mandate correct regex design and testing.
Secure coding standards directly address proper construction and review of regular expressions.