Read the docs
TI-2023-08710 Aliases CVE-2023-22461GHSA-h857-2g56-468g

sanitize-svg Filter Bypass Allows Cross-Site Scripting (XSS)

Priority HIGH 66CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
High · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

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

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.0061 49th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed sanitize-svg (mattkrick): 0.4@mattkrick/sanitize-svg (npm): 0.4.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
mattkricksanitize-svgbefore 0.40.4Patch availableCNA
—@mattkrick/sanitize-svg (npm)before 0.4.00.4.0Patch availableGHSA-h857-2g56-468g
  • sanitize-svg Vendormattkrick Affected before 0.4 Fixed in 0.4 Patch available CNA
  • @mattkrick/sanitize-svg (npm) Vendor— Affected before 0.4.0 Fixed in 0.4.0 Patch available GHSA-h857-2g56-468g

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:sanitize-svg_project:sanitize-svg:*:*:*:*:*:node.js:*:*before 0.4.0VulnerableSanitize-svg Project
  • cpe:2.3:a:sanitize-svg_project:sanitize-svg:*:*:*:*:*:node.js:*:* Versions before 0.4.0 Vulnerable ·Sanitize-svg Project

Remediation

  • Fix · CNA sanitize-svg (mattkrick) Fixed in 0.4
  • Fix · GHSA-h857-2g56-468g @mattkrick/sanitize-svg (npm) Fixed in 0.4.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-22461
  2. 2026-10-03 Alias added: GHSA-h857-2g56-468g

References

Sources