Read the docs
TI-2023-20904 Aliases CVE-2023-40013GHSA-xc2r-jf2x-gjr8

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in external-svg-loader

Priority HIGH 66CWE-79Published · Updated

Key facts

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

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

Summary

SVG Loader is a javascript library that fetches SVGs using XMLHttpRequests and injects the SVG code in the tag's place. According to the docs, svg-loader will strip all JS code before injecting the SVG file for security reasons but the input sanitization logic is not sufficient and can be trivially bypassed. This allows an attacker to craft a malicious SVG which can result in Cross-site Scripting (XSS). When trying to sanitize the svg the lib removes event attributes such as `onmouseover`, `onclick` but the list of events is not exhaustive. Any website which uses external-svg-loader and allows its users to provide svg src, upload svg files would be susceptible to stored XSS attack. This issue has been addressed in commit `d3562fc08` which is included in releases from 1.6.9. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00558 46th percentileScored 2026-11-07
Fix Fixed svg-loader (shubhamjain): 1.6.9external-svg-loader (npm): 1.6.9

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

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

Affected products

VendorProductAffected versionsFixed inStatusSource
shubhamjainsvg-loaderbefore 1.6.91.6.9Patch availableCNA
—external-svg-loader (npm)before 1.6.91.6.9Patch availableGHSA-xc2r-jf2x-gjr8
  • svg-loader Vendorshubhamjain Affected before 1.6.9 Fixed in 1.6.9 Patch available CNA
  • external-svg-loader (npm) Vendor— Affected before 1.6.9 Fixed in 1.6.9 Patch available GHSA-xc2r-jf2x-gjr8

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:shubhamjain:svg_loader:*:*:*:*:*:node.js:*:*before 1.6.9Vulnerableshubhamjain
  • cpe:2.3:a:shubhamjain:svg_loader:*:*:*:*:*:node.js:*:* Versions before 1.6.9 Vulnerable ·shubhamjain

Remediation

  • Fix · CNA svg-loader (shubhamjain) Fixed in 1.6.9
  • Fix · GHSA-xc2r-jf2x-gjr8 external-svg-loader (npm) Fixed in 1.6.9 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-40013
  2. 2026-10-03 Alias added: GHSA-xc2r-jf2x-gjr8

References

Sources