react-svg@2.1.21 vulnerabilities

A React component that injects SVG into the DOM.

  • latest version

    16.3.0

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    10 months ago

  • licenses detected

  • Direct Vulnerabilities

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

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable 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