Junglewise Threat Intelligence

CVE-2026-71497: jsoup XSS in Cleaner with custom Safelist raw-text elements

CVE-2026-71497 · Severity: medium · CVSS 4.7 · Published 2026-08-06

Executive brief

jsoup is a popular Java library used to parse and clean HTML content. A vulnerability exists where the library may fail to properly sanitize malicious web content when using custom security rules, potentially allowing an attacker to execute unauthorized scripts in a user's browser (Cross-Site Scripting). This could lead to the theft of user sessions or the unauthorized modification of web pages.

Technical details

A Cross-Site Scripting (XSS) vulnerability exists in jsoup's Cleaner component when using custom Safelists that permit raw-text elements. The root cause is improper handling of malformed HTML tag names that end in control characters. During parsing, such tags may acquire the behavior of different elements, causing content intended to be treated as plain text to be emitted as active markup after serialization. This allows an attacker to bypass sanitization and inject executable scripts. The vulnerability is present in versions 1.14.3 through 1.23.0 and is fixed in version 1.23.1. Built-in Safelists are not affected.

Affected products

  • jhy jsoup >= 1.14.3, < 1.23.1

Timeline

  • 2026-07-30: disclosed: Initial disclosure by jhy
  • 2026-08-06: advisory: GitHub Advisory published
  • 2026-08-06: patched: Version 1.23.1 released

References