Cross-site scripting in Java HTML Sanitizer - #VU152246
Published: September 25, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary script.
The vulnerability exists due to failure to apply attribute and URL policies in the stripDisallowedTags function when sanitizing untrusted HTML using policies that allow text in style or script elements. A remote attacker can submit crafted HTML containing allowed elements with dangerous attributes or URLs to execute arbitrary script.
Only custom policies that allow a style or script element and use allowTextIn are affected; prepackaged Sanitizers policies are not affected.