react-svg@2.2.15 vulnerabilities

A React component that injects SVG into the DOM.

Direct Vulnerabilities

Known vulnerabilities in the react-svg package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • C
Cross-site Scripting (XSS)

react-svg is a React component that injects SVG into the DOM.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS). The documentation mentioned that the default value for evalScripts is never. The code actually sets the value to once. The evalScripts prop allows scripts to run, this could lead to XSS exploits.

How to fix Cross-site Scripting (XSS)?

Upgrade react-svg to version 2.2.18 or higher.

<2.2.18