org.webjars.npm:dompurify@3.4.8

  • latest version

    3.4.16

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    15 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:dompurify 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
    Incomplete List of Disallowed Inputs

    org.webjars.npm:dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

    Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs in the CUSTOM_ELEMENT_HANDLING. An attacker can cause security-relevant attributes to be preserved on allowed custom elements by leveraging the bypass of the afterSanitizeElements hook, which may result in these attributes being re-injected into an HTML sink such as innerHTML and executed in a later context.

    Note: This is only exploitable if the application enables CUSTOM_ELEMENT_HANDLING, relies on afterSanitizeElements as a security policy layer, and has custom elements that re-inject preserved attribute values into an HTML sink.

    How to fix Incomplete List of Disallowed Inputs?

    Upgrade org.webjars.npm:dompurify to version 3.4.12 or higher.

    [,3.4.12)
    • M
    Cross-site Scripting (XSS)

    org.webjars.npm:dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the IN_PLACE sanitization process when a hook removes an element, leaving its detached descendants with executable event handlers. An attacker can execute arbitrary JavaScript code in the application's origin by supplying crafted HTML that leverages this behavior. This is only exploitable if the application uses the IN_PLACE configuration along with a hook that removes a containing element.

    How to fix Cross-site Scripting (XSS)?

    Upgrade org.webjars.npm:dompurify to version 3.4.13 or higher.

    [,3.4.13)
    • M
    Improper Initialization

    org.webjars.npm:dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

    Affected versions of this package are vulnerable to Improper Initialization in the DOMPurify.setConfig() API when an uponSanitizeAttribute hook is registered that mutates allowedAttributes. An attacker can cause persistent modification of the attribute allowlist by submitting specially crafted content, resulting in unauthorized attributes being permitted in all subsequent sanitization calls.

    How to fix Improper Initialization?

    Upgrade org.webjars.npm:dompurify to version 3.4.11 or higher.

    [,3.4.11)
    • L
    Protection Mechanism Failure

    org.webjars.npm:dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

    Affected versions of this package are vulnerable to Protection Mechanism Failure through the clearConfig function. An attacker can execute arbitrary scripts in a Trusted Types sink by influencing a previously supplied TRUSTED_TYPES_POLICY on a reused instance and later triggering output with RETURN_TRUSTED_TYPE: true.

    Note:

    This is only exploitable if a DOMPurify instance is reused across trust boundaries and a less-trusted integration or attacker has previously set an unsafe Trusted Types policy.

    How to fix Protection Mechanism Failure?

    Upgrade org.webjars.npm:dompurify to version 3.4.9 or higher.

    [,3.4.9)