CVE-2026-71497
jsoup: Cleaner may expose markup with custom raw-text elements
Description
When a custom Safelist permits certain raw-text elements, jsoup may incorrectly sanitize malformed HTML containing a tag name that ends in a control character. The tag may acquire the parsing behavior of a different element, causing content that should remain text to be emitted as active markup after serialization and potentially allowing XSS.
jsoup’s built-in Safelists are unaffected.
Patches
Upgrade to jsoup 1.23.1.
Workarounds
Until upgrading, do not permit raw-text elements in custom Safelists used to clean untrusted HTML.
Additional security considerations
This fix addresses malformed tag-name handling only.
Permitting raw-text elements in a custom Safelist does not make their contents inherently safe. For example, applications that permit style must apply appropriate CSS safeguards separately, because jsoup does not parse or sanitize CSS.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.jsoup » jsoup | >= 1.14.3, < 1.23.1 | 1.23.1 |
Blast radius
62% of the dependent artifacts (7,811) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 50,161 |
| 2 hops | 161,228 |
| 3 hops | 155,213 |
| 4 hops | 60,609 |
| 5 hops | 28,673 |
| 6 hops | 11,200 |
Most used dependents
- org.apache.maven.plugins » maven-site-plugin9,107 usages
- org.apache.maven.plugins » maven-plugin-plugin6,502 usages
- io.quarkus » quarkus-junit52,452 usages
- io.quarkus » quarkus-extension-maven-plugin1,796 usages
- org.jetbrains.dokka » dokka-maven-plugin1,520 usages
- io.quarkus » quarkus-maven-plugin1,484 usages
- org.owasp » dependency-check-maven1,289 usages
- io.quarkus » quarkus-junit5-internal1,163 usages
- net.revelc.code.formatter » formatter-maven-plugin1,025 usages
- com.vaadin » vaadin-server810 usages
- com.vladsch.flexmark » flexmark-all754 usages
- com.jetbrains.intellij.platform » ide-impl753 usages
- io.quarkus » quarkus-junit-internal739 usages
- com.atlassian.confluence » confluence724 usages
- io.quarkus » quarkus-junit699 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
