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.
Severity (CVSS)
| Base score | 4.7 |
|---|---|
| Severity | Medium |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| Provided by | CNA |
Weaknesses
- CWE-79 — CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| jhy | jsoup | >= 1.14.3, < 1.23.1 |
References
- https://github.com/jhy/jsoup/security/advisories/GHSA-pmhh-3w7g-xqp8 (x_refsource_CONFIRM)
- https://github.com/jhy/jsoup/issues/2538 (x_refsource_MISC)
- https://github.com/jhy/jsoup/commit/92f1aca552548b484bc7d4b94c51e48b8e6eca70 (x_refsource_MISC)
- https://github.com/jhy/jsoup/releases/tag/jsoup-1.23.1 (x_refsource_MISC)
Generated from the official CVE List on 07 Aug 2026 07:02 UTC.