{"id":"EUVD-2023-2379","revision":null,"records":[{"revision":"c83e0d546a964d65a7e343c5051427e5","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2023-40013","aliases":[],"title":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in external-svg-loader","description":"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.","state":0,"publishedAt":"2023-08-14T20:10:24.585+00:00","modifiedAt":"2024-10-02T20:35:31.785+00:00","affected":[{"ecosystem":"Vendor product","name":"svg-loader","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"shubhamjain\",\n                    \"product\": \"svg-loader\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.6.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","score":7.1,"severity":"HIGH"}],"references":["https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8","https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c","https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128","https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-40013","license":"CVE Program Terms of Use","key":"cve-program:CVE-2023-40013","identifiers":["CVE-2023-40013"]},"retained":false,"historicalAffected":[]},{"revision":"5bd47717852e43d485ef3990bfcb3c18","observedAt":"2026-11-15T00:31:53.44+00:00","statement":{"source":"euvd","id":"EUVD-2023-2379","aliases":["CVE-2023-40013","GHSA-xc2r-jf2x-gjr8"],"title":"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 inpu…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","score":7.1,"severity":null}],"references":["https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8","https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c","https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128","https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-2379","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 14, 2023, 8:10:24 PM","dateUpdated":"Oct 2, 2024, 8:35:31 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2023-2379","identifiers":["EUVD-2023-2379","CVE-2023-40013","GHSA-xc2r-jf2x-gjr8"]},"retained":false,"historicalAffected":[]},{"revision":"bcdb4121551e4fed8c09d4f51e606244","observedAt":"2026-10-24T22:17:22.004+00:00","statement":{"source":"nvd","id":"CVE-2023-40013","aliases":[],"title":"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 inpu…","description":"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.","state":0,"publishedAt":"2023-08-14T21:15:13.523+00:00","modifiedAt":"2026-06-17T06:15:44.66+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","score":7.1,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"severity":"MEDIUM"}],"references":["https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128","https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c","https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8","https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-40013","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-79"],"productCriteria":["cpe:2.3:a:shubhamjain:svg_loader:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2023-08-14T21:15:13.523","lastModified":"2026-06-17T06:15:44.660"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2023-40013","identifiers":["CVE-2023-40013"]},"retained":false,"historicalAffected":[]},{"revision":"db777ea3d298470bbbf99b41a29d52e3","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-xc2r-jf2x-gjr8","aliases":["CVE-2023-40013"],"title":"external-svg-loader Cross-site Scripting vulnerability","description":"### Summary\nAccording to the [docs](https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript), 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 XSS. \n\n### Details\nWhen trying to sanitize the svg the lib [removes event attributes](https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128) such as `onmouseover`, `onclick` but the list of events is not exhaustive. Here's a list of events not removed by svg-loader. \n`onafterscriptexecute, onbeforecopy, onbeforecut, onbeforescriptexecute, onbeforetoggle, onbegin, onbounce, onend, onfinish, onfocusin, onfocusout, onmousewheel, onpointerrawupdate, onrepeat, onsearch, onshow, onstart, ontoggle(popover), ontouchend, ontouchmove, ontouchstart`\nAs you can see in the POC we can use `onbegin` in `animate` tag to execute JS code without needing to add `data-js=\"enabled\"`.\n\n### PoC\n\n```html\n<svg version=\"1.1\" baseProfile=\"full\" xmlns=\"http://www.w3.org/2000/svg\">\n  <animate onbegin=alert(1) attributeName=x dur=1s>\n</svg>\n\n```\n\n```html\n<html>\n    <head>\n        <script src=\"./dist/svg-loader.js\" type=\"text/javascript\"></script>\n    </head>\n    <body>\n        <svg data-src=\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJmdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwb2x5Z29uIGlkPSJ0cmlhbmdsZSIgcG9pbnRzPSIwLDAgMCw1MCA1MCwwIiBmaWxsPSIjMDA5OTAwIiBzdHJva2U9IiMwMDQ0MDAiLz4KICA8YW5pbWF0ZSBvbmJlZ2luPWFsZXJ0KDEpIGF0dHJpYnV0ZU5hbWU9eCBkdXI9MXM+Cjwvc3ZnPgo=\"></svg>\n    </body>\n</html>\n\n```\n\n### Impact\nAny website which uses external-svg-loader and allows its users to provide svg src, upload svg files would be susceptible to stored XSS attack.\n","state":0,"publishedAt":"2023-08-14T21:32:27+00:00","modifiedAt":"2026-09-10T03:50:03.0217942+00:00","affected":[{"ecosystem":"npm","name":"external-svg-loader","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.6.9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8","https://nvd.nist.gov/vuln/detail/CVE-2023-40013","https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c","https://github.com/shubhamjain/svg-loader","https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128","https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript"],"sourceUrl":"https://github.com/advisories/GHSA-xc2r-jf2x-gjr8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-xc2r-jf2x-gjr8","identifiers":["GHSA-xc2r-jf2x-gjr8","CVE-2023-40013"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T17:50:33.0489747+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T17:50:33.0489747+00:00","lastSuccessAt":"2026-11-16T17:50:33.2117758+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:50:33.2117767+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-5b5b992da2316e50415088e271a61a5a7b3b1ba305843116b4783c1ec86d58fa","complete":true,"records":426108,"lastAttemptAt":"2026-11-16T17:44:52.1128297+00:00","lastSuccessAt":"2026-11-16T17:44:52.0341248+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:44:52.1128297+00:00","snapshotPublishedAt":"2026-11-16T17:27:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-984340aa647d443f854924f0852ab319","complete":true,"records":13830,"lastAttemptAt":"2026-11-16T17:51:18.1027612+00:00","lastSuccessAt":"2026-11-16T17:51:18.097+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:51:18.097+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13883,"expectedIdentifiers":13883,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T17:50:33.0489747+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T17:50:33.0489747+00:00","lastSuccessAt":"2026-11-16T17:50:33.2125903+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:50:33.2125908+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-62158c3b10d140c88161da87af98dd6f","complete":false,"records":13842,"lastAttemptAt":"2026-11-16T17:50:59.5110915+00:00","lastSuccessAt":"2026-11-16T17:50:59.505+00:00","error":"209 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T17:50:59.505+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13474,"expectedIdentifiers":13883,"failedIdentifiers":209},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T17:50:32.8950504+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:50:32.8950504+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T17:44:52.338834+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:44:52.338834+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T17:50:33.0056326+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:50:33.0056326+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-3da619381c9f1c87f7b45518cd7541780ba25dac78a9f5cb3562eee84c7eac8f","complete":true,"records":232512,"lastAttemptAt":"2026-11-16T17:50:32.6652455+00:00","lastSuccessAt":"2026-11-16T17:50:31.6385672+00:00","error":null,"lastVerifiedAt":"2026-11-16T17:50:32.6652455+00:00","snapshotPublishedAt":"2026-11-16T17:33:38+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}