{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-33418","id":"CVE-2026-33418","title":"@dicebear/converter ensureSize() Vulnerable to SVG Dimension Capping Bypass via XML Comment Injection","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 ","descriptionLong":"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.","published":"2026-03-24T13:25:57.540Z","updated":"2026-10-28T02:31:09.111384153Z","reserved":"2026-03-19T18:45:22.431Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["dicebear"],"affectedProducts":[{"vendor":"dicebear","product":"dicebear","defaultStatus":null,"versions":[{"version":"< 9.4.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@dicebear/converter","purl":"pkg:npm/%40dicebear/converter","ranges":["<9.4.2"],"fixed":["9.4.2"],"advisory":"GHSA-7j2x-32w6-p43p"}],"cwes":["CWE-185"],"aliases":["GHSA-7j2x-32w6-p43p"],"references":[{"url":"https://github.com/dicebear/dicebear/security/advisories/GHSA-7j2x-32w6-p43p","tags":["x_refsource_CONFIRM","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33418.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33418","tags":["advisory"]},{"url":"https://github.com/dicebear/dicebear","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00415,"epssPercentile":0.36511,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-33418","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33418","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-33418","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7j2x-32w6-p43p","ok":true,"note":"GHSA-7j2x-32w6-p43p"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-33418","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}