CVE-2023-22461
JavaScript vulnerability analysis and mitigation

Overview

The CVE-2023-22461 affects the sanitize-svg package, a small SVG sanitizer designed to prevent cross-site scripting attacks. The vulnerability was discovered in versions prior to 0.4.0, where the package used a deny-list pattern that failed to properly sanitize SVGs, potentially allowing cross-site scripting attacks. The issue was disclosed on January 4, 2023, and was subsequently patched in version 0.4.0 (GitHub Advisory).

Technical details

The vulnerability stems from an incomplete deny-list pattern implementation that only checked for literal <script> tags and on-event handlers. The package failed to account for other methods of embedding JavaScript in XML files, such as anchor tags with javascript: URIs and foreign object tags. The CVSS v3.1 base score is 7.6 (High), with a vector string of CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N. The vulnerability is classified under CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page) (NVD).

Impact

Downstream software that relies on sanitize-svg and expects resulting SVGs to be safe may be vulnerable to cross-site scripting attacks. The vulnerability allows attackers to bypass the intended security measures and potentially execute malicious JavaScript code through specially crafted SVG files. At least one downstream project was confirmed to have security implications due to this vulnerability (GitHub Advisory).

Mitigation and workarounds

The vulnerability was addressed in version 0.4.0 of the sanitize-svg package. Users should upgrade to this version or later to receive the security fix. No alternative workarounds are available (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65959HIGH8.7
  • JavaScriptJavaScript
  • open-webui
NoYesDec 04, 2025
CVE-2025-66032HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesDec 03, 2025
CVE-2025-65945HIGH7.5
  • JavaScriptJavaScript
  • jws
NoYesDec 04, 2025
CVE-2025-66404MEDIUM6.4
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesDec 03, 2025
CVE-2025-66479LOW1.8
  • JavaScriptJavaScript
  • @anthropic-ai/sandbox-runtime
NoYesDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management