7.1
HIGH
CVE-2023-40013
SVG Loader Cross-site Scripting (XSS) Vulnerability
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.

INFO

Published Date :

Aug. 14, 2023, 9:15 p.m.

Last Modified :

Aug. 23, 2023, 12:03 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.5

Exploitability Score :

1.6
Affected Products

The following products are affected by CVE-2023-40013 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Shubhamjain svg_loader
References to Advisories, Solutions, and Tools

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-40013 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-40013 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Aug. 23, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    Changed Reference Type https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128 No Types Assigned https://github.com/shubhamjain/svg-loader/blob/main/svg-loader.js#L125-L128 Product
    Changed Reference Type https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c No Types Assigned https://github.com/shubhamjain/svg-loader/commit/d3562fc08497aec5f33eb82017fa1417b3319e2c Patch
    Changed Reference Type https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8 No Types Assigned https://github.com/shubhamjain/svg-loader/security/advisories/GHSA-xc2r-jf2x-gjr8 Vendor Advisory
    Changed Reference Type https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript No Types Assigned https://github.com/shubhamjain/svg-loader/tree/main#2-enable-javascript Product
    Added CPE Configuration OR *cpe:2.3:a:shubhamjain:svg_loader:*:*:*:*:*:node.js:*:* versions up to (excluding) 1.6.9
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-40013 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2023-40013 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.06 }} 0.00%

score

0.29206

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability