CVE-2026-71497 jsoup: Cleaner may expose markup with custom raw-text elements

Medium 4.7 Published Updated

Attackers can trigger cross-site scripting in jsoup when custom Safelists permit raw-text elements, due to incorrect parsing of malformed tags.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-71497?

CVE-2026-71497 is a medium-severity cross-site scripting vulnerability in jhy jsoup, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

jsoup is a Java library for working with real-world HTML. From 1.14.3 until 1.23.1, jsoup's HTML parser could incorrectly handle a malformed tag name ending in a control character, causing the tag to acquire the parsing behavior of a different element. When a custom Safelist permits certain raw-text elements, this misparsing can cause content that should remain inert text to be emitted as active markup after serialization, potentially resulting in cross-site scripting. jsoup's built-in Safelists are not affected. This issue is fixed in version 1.23.1.

Weakness: CWE-79

Which versions are affected by CVE-2026-71497?

2 open source packages ship an affected version, including org.jsoup:jsoup.

PackageAffectedFixed in
org.jsoup:jsoup MavenFrom 1.14.31.23.1
org.jsoup:jsoup MavenFrom 1.14.31.23.1

How do I fix CVE-2026-71497?

Upgrade org.jsoup:jsoup to 1.23.1 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-71497 being exploited?

There is no known exploitation of CVE-2026-71497 in the wild and no public exploit code.

Sources

Also known as AZL-95475, CLEANSTART-2026-BY71102, CLSA-2026-1787667194, DEBIAN-CVE-2026-71497, ECHO-9cfc-4e75-922c, GHSA-pmhh-3w7g-xqp8 and 23 more.

Is CVE-2026-71497 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free