Security mailing lists by PureSourceCode

CVE-2023-22461

MEDIUM 6.1CVSS 3.1

@mattkrick/sanitize-svg vulnerable to Cross-Site Scripting (XSS)

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

Published
4 Jan 2023
Last modified
17 Jun 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-79
Also known as
GHSA-h857-2g56-468g
Sources
NVDJSONOSV GHSA-h857-2g56-468gJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.6 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
OSV GitHub CVSS 3.1 HIGH 7.6 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD sanitize-svg_project sanitize-svg
cpe:2.3:a:sanitize-svg_project:sanitize-svg:*:*:*:*:*:node.js:*:*
< 0.4.0 0.4.0
OSV npm @mattkrick/sanitize-svg < 0.4.0 0.4.0

References

History

  • 25 Nov 2026 20:35 UTC · NVD: first stored (published 4 Jan 2023)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 5 Jan 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.