{"id":"CVE-2023-22461","published":"2023-01-04T14:57:04Z","modified":"2025-03-10T21:33:03Z","title":"sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)","vendor":"mattkrick","product":"sanitize-svg","tier":"tail","description":{"text":"The `sanitize-svg` package, a small SVG sanitizer to prevent cross-site scripting attacks, uses a deny-list-pattern to sanitize SVGs to prevent XSS. In doing so, literal `<script>`-tags and on-event handlers were detected in versions prior to 0.4.0. As a result, downstream software that relies on `sanitize-svg` and expects resulting SVGs to be safe, may be vulnerable to cross-site scripting. This vulnerability was addressed in v0.4.0. There are no known workarounds\n\n","provenance":"source","from":"CVE.org"},"cvss":{"score":7.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00641,"percentile":0.45242,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"references":[{"url":"https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d","tags":["x_refsource_MISC"]}],"priority":{"score":14.4,"factors":[{"name":"EPSS percentile","points":9.05},{"name":"CVSS severity","points":5.32}]},"vendorSlug":"mattkrick","affectedVersions":[{"vendor":"mattkrick","product":"sanitize-svg","versions":["< 0.4"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T21:01:57.871939Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@mattkrick/sanitize-svg","vulnerableRanges":["<0.4.0"],"patched":["0.4.0"],"from":["GHSA-h857-2g56-468g"],"provenance":"source"}],"summary":{"text":"The sanitize-svg package from mattkrick uses a deny-list approach that only detects literal script tags and on-event handlers, so SVG content can slip past it and reach downstream applications that assume the output is safe. An attacker who can supply SVG input that the application processes and later renders needs low privileges and must get a user to interact with the resulting content, which then allows cross-site scripting that can compromise confidentiality and integrity within the affected application's security scope.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:30:29Z"},"euvd":{"id":"EUVD-2023-0483","exploited":false,"provenance":"source"}}