Skip to content

← Public intelligence

Maven package

com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.6MavenPublished

    OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization

    CVE-2025-66021 · GHSA-g9gq-3pfx-2gw2

    Affected
    • Maven com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer >= 20240325.1, <= 20240325.1
    Fixed in
    20260101.1· Vendor fix available
    Issue
    It is observed that OWASP java html sanitizer is vulnerable to XSS if HtmlPolicyBuilder allows noscript and style tags with allowTextIn inside the style tag. This could lead to XSS if the payload is crafted in such a way that it does not sanitise the CSS and allows tags which is not mentioned in HTML policy. Details The OWASP java HTML sanitizer is vulnerable to XSS. This only happens when HtmlPolicyBuilder allows noscript & style tag with allowTextIn inside style tags. The following condition is very edge case but if users combine a HtmlPolicyBuilder with any other tags except noscript and allow style tag with allowTextIn inside the style tag then In this case sanitizer would be safe from XSS. This happens because how the browser also perceives noscript tags post sanitization. PoC 1. Lets create a HtmlPolicyBuilder which allows p, noscript, style html tags and allows .allowTextIn("style"). 2. There are two XSS payloads which very identical and only difference is one has p…

    Recommended action: Upgrade to 20260101.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. UnratedMavenPublished

    OWASP HTML Sanitizer allows redirecting to an arbitrary URL when JavaScript is disabled

    CVE-2011-4457 · GHSA-pcm9-fp55-563v

    Affected
    • Maven com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer < 88
    Fixed in
    88· Vendor fix available
    Issue
    OWASP HTML Sanitizer (aka owasp-java-html-sanitizer) before 88, when JavaScript is disabled, allows user-assisted remote attackers to obtain potentially sensitive information via a crafted FORM element within a NOSCRIPT element.

    Recommended action: Upgrade to 88 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. Critical, CVSS 9.8MavenPublished

    Policies not properly enforced in OWASP Java HTML Sanitizer

    CVE-2021-42575 · GHSA-3w73-fmf3-hg5c

    Affected
    • Maven com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer < 20211018.1
    Fixed in
    20211018.1· Vendor fix available
    Issue
    The OWASP Java HTML Sanitizer before 20211018.1 does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

    Recommended action: Upgrade to 20211018.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →