{"cve":"CVE-2026-33418","nvd":{"published":"2026-03-24T14:16:30.453","modified":"2026-06-17T10:37:27.807","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-185"],"references":["https://github.com/dicebear/dicebear/security/advisories/GHSA-7j2x-32w6-p43p"],"products":["dicebear:dicebear"],"source":"nvd","synced_at":"2026-10-19T22:26:19.218427112+00:00"},"epss":{"cve":"CVE-2026-33418","score":0.00382,"percentile":0.3231,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-7j2x-32w6-p43p","url":"https://osv.dev/vulnerability/GHSA-7j2x-32w6-p43p","summary":"SVG Dimension Capping Bypass via XML Comment Injection in @dicebear/converter ensureSize()","modified":"2026-03-25T21:05:05.061732Z","packages":[{"ecosystem":"npm","name":"@dicebear/converter","purl":"pkg:npm/%40dicebear/converter","ranges":["<9.4.2"],"fixed":["9.4.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}