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.
Published: 2026-08-06
Score: 4.7 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability lies in jsoup’s HTML parser, which can misinterpret a malformed tag name that ends with a control character. When a custom Safelist permits raw‑text elements, this misparsing causes content that should remain inert text to be treated as active markup during serialization, creating an XSS vector. The flaw is classified as CWE‑79 and CWE‑1289 and can lead to the execution of attacker‑provided scripts in a user’s browser if the parsed content is rendered.

Affected Systems

The defect affects the Java library jsoup, vendor jhy, for all releases from 1.14.3 up to, but not including, 1.23.1. Users of versions 1.14.3 through 1.23.0 who configure a custom Safelist that allows raw‑text elements are vulnerable. The built‑in Safelists provided by jsoup are not impacted.

Risk and Exploitability

The vulnerability receives a CVSS score of 4.7, indicating moderate severity. No EPSS score is available, and the attack remains undetected in the CISA KEV catalog. Exploitation requires an application to feed attacker‑controlled HTML to jsoup’s Cleaner with a custom Safelist that permits raw‑text elements. If the application uses only the default Safelists, the risk is reduced. The threat is therefore constrained to environments where custom Safelists are in use and the parser is invoked on untrusted content.

Generated by OpenCVE AI on August 7, 2026 at 13:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade jsoup to version 1.23.1 or later
  • If upgrading is infeasible, replace the custom Safelist with one that does not permit raw‑text elements or revert to the built‑in Safelists
  • Validate or sanitize any input sent to the Cleaner before processing

Generated by OpenCVE AI on August 7, 2026 at 13:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-pmhh-3w7g-xqp8 jsoup: Cleaner may expose markup with custom raw-text elements
History

Fri, 07 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1289
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 07 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Jhy
Jhy jsoup
Vendors & Products Jhy
Jhy jsoup

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
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.
Title jsoup: Cleaner may expose markup with custom raw-text elements
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T14:37:56.848Z

Reserved: 2026-08-06T19:56:23.726Z

Link: CVE-2026-71497

cve-icon Vulnrichment

Updated: 2026-08-07T14:37:53.451Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:32.043

Modified: 2026-08-07T15:17:03.973

Link: CVE-2026-71497

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-06T21:09:31Z

Links: CVE-2026-71497 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T14:00:03Z

Weaknesses
  • CWE-1289

    Improper Validation of Unsafe Equivalence in Input

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')