CVE-2023-22461 json
sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)
published 2023-01-04 3 y ago modified 2026-06-17 4 mo ago also GHSA-h857-2g56-468g , EUVD-2023-0483
- cvss
- 7.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
Summary
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
Patch / fix
- npm @mattkrick/sanitize-svg 0.4.0
- sanitize-svg_project sanitize-svg 0.4.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 20 mo ago
Exploit prediction
0.61% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.6 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 7.6 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @mattkrick/sanitize-svg | <0.4.0 |
0.4.0 |
Affected products
- mattkrick sanitize-svg
Classification
References
-
github.com
/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d
web, patch, third-party-advisory
-
github.com
/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-22461
advisory
-
github.com
/mattkrick/sanitize-svg
package
Sources
- CVE List CVE-2023-22461
- GitHub Advisory GHSA-h857-2g56-468g
- NVD CVE-2023-22461
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.