CVE-2023-22461
published high CVSS 3.1 · 7.6sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| mattkrick | — | sanitize-svg< 0.4 | Affected | Not stated | GitHub_M |
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 vulnerability was addressed in v0.4.0. There are no known workarounds
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.6 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| mattkrick | sanitize-svg | < 0.4 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- CWE-80 CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
References
2Provider assertions
3GitHub_M · cna
sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- e61ae43cd72210a182314798340ec731250b2461ed7ffe405ef4a2a486e9f574
- Ingested
- 23 Sep 2026, 08:06:15 UTC
- Source record
- Official CVE record