svgo@0.1.7

SVGO is a Node.js library and command-line application for optimizing vector images.

  • latest version

    4.1.0

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    24 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the svgo 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
    • L
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the removeScripts plugin due to incomplete filtering of executable links in plugins/removeScripts.js and lib/svgo/tools.js. An attacker can execute arbitrary scripts in the context of the SVG's origin, expose sensitive data, modify content, or perform actions as the victim by crafting SVG files with namespace-prefixed anchor elements or control characters in URLs, which bypass the intended filtering.

    Note: This is only exploitable if attacker-controlled SVG input is processed and the resulting SVG is served in an active browser context where a victim interacts with the malicious link.

    How to fix Cross-site Scripting (XSS)?

    Upgrade svgo to version 2.8.4, 3.3.5, 4.1.0 or higher.

    <2.8.4>=3.0.0 <3.3.5>=4.0.0-rc.0 <4.1.0
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the removeScriptElement plugin, which fails to strip SVG event attributes (e.g. onclick, onload), javascript: and vbscript: scheme URLs, executable data: URLs, and srcdoc attributes inside foreignObject elements. An attacker can supply a malicious SVG that survives sanitization and executes arbitrary JavaScript in a victim's browser when the optimized SVG is rendered.

    How to fix Cross-site Scripting (XSS)?

    Upgrade svgo to version 2.8.4, 3.3.5, 4.1.0 or higher.

    <2.8.4>=3.0.0 <3.3.5>=4.0.0-rc.0 <4.1.0
    • M
    Incomplete List of Disallowed Inputs

    Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs via improper handling of namespaced or prefixed script elements and case-sensitive matching of JavaScript URIs in the removeScripts plugin. An attacker can execute arbitrary scripts in the context of the application by uploading specially crafted SVG files containing executable scripts or JavaScript URIs that bypass sanitization.

    How to fix Incomplete List of Disallowed Inputs?

    Upgrade svgo to version 2.8.3, 3.3.4, 4.0.2 or higher.

    <2.8.3>=3.0.0 <3.3.4>=4.0.0 <4.0.2