<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Sat, 10 Oct 2026 14:58:15 +0000</lastBuildDate>
    <item>
      <title>GHSA-g9gq-3pfx-2gw2 — OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-g9gq-3pfx-2gw2</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Maven: com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer&lt;/p&gt;
&lt;p&gt;### Summary
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.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;The OWASP java HTML sanitizer is vulnerable to XSS. This only happens when HtmlPolicyBuilder allows `noscript` &amp;amp; `style` tag with `allowTextIn` inside style tags.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;1.  Lets create a `HtmlPolicyBuilder` which allows `p, noscript, style` html tags and allows `.allowTextIn(&amp;#34;style&amp;#34;)`.
2.  There are two XSS payloads which very identical and only difference is one has p tag and other has noscript tag.
These payload have script tags that could be vulnerable to XSS and should be stripped out after sanitisation.&lt;/p&gt;
&lt;p&gt;```HTML
1. &amp;lt;noscript&amp;gt;&amp;lt;style&amp;gt;&amp;lt;/noscript&amp;gt;&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;
2. &amp;lt;p&amp;gt;&amp;lt;style&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;
```&lt;/p&gt;
&lt;p&gt;3. Run the following piece of code which sanitizes the payload.&lt;/p&gt;
&lt;p&gt;```java
public class main {
	private static final String ALLOWED_HTML_TAGS = &amp;#34;p, noscript, style&amp;#34;;&lt;/p&gt;
&lt;p&gt;/**
	 * Description of vulnerabil…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Maven: com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer&lt;/p&gt;
&lt;p&gt;### Summary
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.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;The OWASP java HTML sanitizer is vulnerable to XSS. This only happens when HtmlPolicyBuilder allows `noscript` &amp;amp; `style` tag with `allowTextIn` inside style tags.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;1.  Lets create a `HtmlPolicyBuilder` which allows `p, noscript, style` html tags and allows `.allowTextIn(&amp;#34;style&amp;#34;)`.
2.  There are two XSS payloads which very identical and only difference is one has p tag and other has noscript tag.
These payload have script tags that could be vulnerable to XSS and should be stripped out after sanitisation.&lt;/p&gt;
&lt;p&gt;```HTML
1. &amp;lt;noscript&amp;gt;&amp;lt;style&amp;gt;&amp;lt;/noscript&amp;gt;&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;
2. &amp;lt;p&amp;gt;&amp;lt;style&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;
```&lt;/p&gt;
&lt;p&gt;3. Run the following piece of code which sanitizes the payload.&lt;/p&gt;
&lt;p&gt;```java
public class main {
	private static final String ALLOWED_HTML_TAGS = &amp;#34;p, noscript, style&amp;#34;;&lt;/p&gt;
&lt;p&gt;/**
	 * Description of vulnerabil…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-g9gq-3pfx-2gw2</guid>
    </item>
  </channel>
</rss>
