Live threats

All CVEs / Sanitize-svg Project

CVE-2023-22461Sanitize-svg Project Sanitize-svg

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
0.6%
probability of exploitation in 30 days · percentile 45
Auth required
No
Published
Jan 4, 2023
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79, CWE-80
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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

Original NVD text.

What to do

  1. Apply the vendor's security update for Sanitize-svg.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm @mattkrick/sanitize-svg < 0.4.0 0.4.0 npm install @mattkrick/sanitize-svg@0.4.0

Per OSV / GitHub Advisories (GHSA-h857-2g56-468g). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
sanitize-svg_projectsanitize-svg< 0.4.0

Official sources

References

Links published by the sources. Open them with care.