CVE-2023-40013 — SVG Loader is a javascript library that fetches SVGs using XMLHttpRequests and i
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 suffici
Published
2023-08-14T20:10:24.585Z
Last modified
2024-10-02T20:35:31.785Z
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
01What is this vulnerability?
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…
02Affected products
| Vendor | Product | Versions |
|---|
| shubhamjain | svg | loader — < 1.6.9 |
03Active exploitation status
Not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. EPSS is the best forward-looking signal — see the EPSS row above.
04Recommended remediation
- Patch to a fixed version listed in the vendor advisory (see references below).
- Mitigate with WAF rules, network egress filters, or feature flags where the patch is not yet available.
- Hunt historical logs for exploitation indicators — see Detection signatures below.
05Technical details
For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.
06Detection signatures
Open the Sigma generator with a pre-filled prompt for this CVE to draft a starting detection in your stack of choice:
Open in Sigma generator →
07Related CVEs
No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.
08Timeline
- Published: 2023-08-14T20:10:24.585Z
- Last modified: 2024-10-02T20:35:31.785Z
09References
- github.com — https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr…
- github.com — https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa141…
- github.com — https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128
- github.com — https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript
Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →