{"cve":"CVE-2026-33311","nvd":{"published":"2026-03-24T14:16:30.290","modified":"2026-06-17T10:37:18.110","status":"Analyzed","description":"DiceBear is an avatar library for designers and developers. Starting in version 5.0.0 and prior to versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, and 9.4.1, SVG attribute values derived from user-supplied options (`backgroundColor`, `fontFamily`, `textColor`) were not XML-escaped before interpolation into SVG output. This could allow Cross-Site Scripting (XSS) when applications pass untrusted input to `createAvatar()` and serve the resulting SVG inline or with `Content-Type: image/svg+xml`. Starting in versions 5.4.4, 6.1.4, 7.1.4, 8.0.3, and 9.4.1, all affected SVG attribute values are properly escaped using XML entity encoding. Users should upgrade to the listed patched versions. Some mitigating factors limit vulnerability. Applications that validate input against the library's JSON Schema before passing it to `createAvatar()` are not affected. The DiceBear CLI validates input via AJV and was not vulnerable. Exploitation requires that an application passes untrusted, unvalidated external input directly as option values.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7},"cwes":["CWE-79"],"references":["https://github.com/dicebear/dicebear/security/advisories/GHSA-mr9r-mww3-v6gv"],"products":["dicebear:dicebear"],"source":"nvd","synced_at":"2026-10-19T22:26:19.218427112+00:00"},"epss":{"cve":"CVE-2026-33311","score":0.00188,"percentile":0.08445,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-mr9r-mww3-v6gv","url":"https://osv.dev/vulnerability/GHSA-mr9r-mww3-v6gv","summary":"SVG Injection via Unsanitized Options in @dicebear/core and @dicebear/initials","modified":"2026-09-10T03:51:00.638214758Z","packages":[{"ecosystem":"npm","name":"@dicebear/core","purl":"pkg:npm/%40dicebear/core","ranges":[">=5.0.0 <5.4.4"],"fixed":["5.4.4"]},{"ecosystem":"npm","name":"@dicebear/core","purl":"pkg:npm/%40dicebear/core","ranges":[">=6.0.0 <6.1.4"],"fixed":["6.1.4"]},{"ecosystem":"npm","name":"@dicebear/core","purl":"pkg:npm/%40dicebear/core","ranges":[">=7.0.0 <7.1.4"],"fixed":["7.1.4"]},{"ecosystem":"npm","name":"@dicebear/core","purl":"pkg:npm/%40dicebear/core","ranges":[">=8.0.0 <8.0.3"],"fixed":["8.0.3"]},{"ecosystem":"npm","name":"@dicebear/core","purl":"pkg:npm/%40dicebear/core","ranges":[">=9.0.0 <9.4.1"],"fixed":["9.4.1"]},{"ecosystem":"npm","name":"@dicebear/initials","purl":"pkg:npm/%40dicebear/initials","ranges":[">=5.0.0 <5.4.4"],"fixed":["5.4.4"]},{"ecosystem":"npm","name":"@dicebear/initials","purl":"pkg:npm/%40dicebear/initials","ranges":[">=6.0.0 <6.1.4"],"fixed":["6.1.4"]},{"ecosystem":"npm","name":"@dicebear/initials","purl":"pkg:npm/%40dicebear/initials","ranges":[">=7.0.0 <7.1.4"],"fixed":["7.1.4"]},{"ecosystem":"npm","name":"@dicebear/initials","purl":"pkg:npm/%40dicebear/initials","ranges":[">=8.0.0 <8.0.3"],"fixed":["8.0.3"]},{"ecosystem":"npm","name":"@dicebear/initials","purl":"pkg:npm/%40dicebear/initials","ranges":[">=9.0.0 <9.4.1"],"fixed":["9.4.1"]}]}],"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."]}