GitHub Advisoryadvisory · Maven

GHSA-pmhh-3w7g-xqp8 jsoup: Cleaner may expose markup with custom raw-text elements

MEDIUM Published 2026-08-06 Modified 2026-08-06 Official page ↗
Aliases
CVE-2026-71497
Ecosystem
Maven
Packages
org.jsoup:jsoup
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2026-08-06

Affected packages

• Maven org.jsoup:jsoup: >= 1.14.3, < 1.23.1 → fixed in 1.23.1

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.

Related

Alias · CVE (1)

  • CVE-2026-71497 jsoup is a Java library for working with real-world HTML. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References