sanitize-html@2.12.0 vulnerabilities

Clean up user-submitted HTML, preserving allowlisted elements and allowlisted attributes on a per-element basis

  • latest version

    2.17.0

  • latest non vulnerable version

  • first published

    12 years ago

  • latest version published

    5 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the sanitize-html 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
    • M
    Information Exposure

    sanitize-html is a library that allows you to clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis

    Affected versions of this package are vulnerable to Information Exposure when used on the backend and with the style attribute allowed, allowing enumeration of files in the system (including project dependencies). An attacker could exploit this vulnerability to gather details about the file system structure and dependencies of the targeted server.

    How to fix Information Exposure?

    Upgrade sanitize-html to version 2.12.1 or higher.

    <2.12.1