{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-22461","id":"CVE-2023-22461","title":"sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)","description":"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 ","descriptionLong":"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","published":"2023-01-04T14:57:04.902Z","updated":"2026-10-28T02:30:44.771188485Z","reserved":"2022-12-29T03:00:40.879Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","rating":"high","source":"GitHub"}],"rating":"high","products":["mattkrick sanitize-svg"],"affectedProducts":[{"vendor":"mattkrick","product":"sanitize-svg","defaultStatus":null,"versions":[{"version":"< 0.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@mattkrick/sanitize-svg","purl":"pkg:npm/%40mattkrick/sanitize-svg","ranges":["<0.4.0"],"fixed":["0.4.0"],"advisory":"GHSA-h857-2g56-468g"}],"cwes":["CWE-79","CWE-80"],"aliases":["GHSA-h857-2g56-468g"],"references":[{"url":"https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22461.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22461","tags":["advisory"]},{"url":"https://github.com/mattkrick/sanitize-svg","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.0061,"epssPercentile":0.50007,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-22461","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22461","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-22461","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-h857-2g56-468g","ok":true,"note":"GHSA-h857-2g56-468g"},{"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-2023-22461","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}