Skip to main content

jsoup EUVDEUVD-2026-54153

| CVE-2026-71497 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-06 https://github.com/jhy/jsoup GHSA-pmhh-3w7g-xqp8
4.7
CVSS 3.1 · Vendor: https://github.com/jhy/jsoup
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify application using jsoup custom Safelist with raw-text elements
  2. Delivery
    Craft malformed HTML tag name ending in control character
  3. Exploit
    Submit payload to HTML-accepting endpoint
  4. Install
    jsoup tokenizer trims control character, normalizes to known raw-text element
  5. C2
    Safelist check passes on original malformed name
  6. Execute
    Serialized output contains active executable markup
  7. Impact
    Victim browser executes injected script

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two simultaneous non-default application-side conditions: (1) the application must construct a custom Safelist instance rather than using any of jsoup's built-in Safelists (Safelist.basic(), Safelist.relaxed(), etc.), AND (2) that custom Safelist must explicitly include at least one raw-text element - script, style, textarea, title, or xmp - via addTags() or equivalent. The attacker must also supply malformed HTML whose tag name ends in a control character that, after trimming, resolves to one of those permitted raw-text elements. User interaction is required per CVSS UI:R - the victim must view or load a page that renders the sanitized output. These conditions limit the realistic attack surface to a specific and unusual subset of jsoup deployments; applications using only built-in Safelists are explicitly and categorically unaffected.

Impact

The vendor-assigned CVSS 4.7 (Medium) with vector AV:N/AC:H/PR:N/UI:R/S:C accurately reflects constrained real-world exploitability. Attack Complexity is High because two non-default conditions must hold simultaneously: the application must use a custom Safelist (not any built-in jsoup Safelist), and that Safelist must explicitly add raw-text elements. Changed Scope captures the cross-origin XSS impact in the victim's browser. No EPSS data was supplied in the input, so exploitation probability cannot be quantified; however, the dual precondition substantially limits the exposed population - only applications making a deliberate and unusual Safelist configuration choice are at risk. This vulnerability is not listed in CISA KEV and no public proof-of-concept has been identified, making the current threat posture lower than the XSS classification alone might suggest. For organizations running affected jsoup versions with default or built-in Safelists, risk is effectively zero; for those using custom raw-text-permitting Safelists, the risk is real and should be patched promptly despite the medium CVSS score.

Exploit ScenarioDerived

An attacker submits HTML containing a malformed tag - for example, a template element whose name is suffixed with the ASCII control character U+001E - to an application that sanitizes user content with jsoup using a custom Safelist permitting raw-text elements. jsoup's tokenizer strips the control character during normalization, resolving the name to template, which then acquires raw-text element parsing semantics; the Safelist check passes because the original malformed name matched an allowed entry, but serialization emits the inner content as active markup rather than escaped text. A victim who views the rendered page has attacker-controlled script executed in their browser session.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 06, 2026

HTML sanitization bypass in jsoup versions 1.14.3 through 1.23.0 allows cross-site scripting when applications deploy a custom Safelist that explicitly permits raw-text elements. The parser's tag-name normalization trimmed trailing control characters (e.g., U+001E) from malformed tag names, causing a crafted element to acquire the parsing behavior of a recognized raw-text element; content intended to remain escaped text was then serialized as active markup, bypassing sanitization. jsoup's built-in Safelists are unaffected, and no public exploit or CISA KEV listing has been identified at time of analysis.

RemediationAI

Upgrade to jsoup 1.23.1 (vendor-released patch confirmed via GHSA-pmhh-3w7g-xqp8 and https://github.com/jhy/jsoup/releases/tag/jsoup-1.23.1); the underlying fix is in commit 92f1aca552548b484bc7d4b94c51e48b8e6eca70. If an immediate upgrade is not feasible, the vendor-documented workaround is to remove all raw-text elements from any custom Safelist used to process untrusted HTML - specifically, do not call addTags() with script, style, textarea, title, or xmp on a Safelist applied to user-controlled input; this eliminates the vulnerable code path at the cost of losing those element types in sanitized output. The vendor additionally notes that even after patching, permitting style in a custom Safelist requires separate CSS sanitization, because jsoup does not parse or validate CSS content.

Affected VersionsENISA

jsoup 1.14.3, < 1.23.1

Affected Packages

maven org.jsoup:jsoup fix: 1.23.1
euvd jsoup_1_14_3 fix: 1.23.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

jsoup (Maven: org.jsoup:jsoup) is a widely used Java library for HTML parsing and sanitization. Its Cleaner component applies Safelist rules to strip disallowed elements and attributes from untrusted HTML. Raw-text elements - script, style, textarea, title, xmp - are special: browsers treat their content as raw text rather than nested markup. The root cause (CWE-79) resided in two locations in the parser: Token.java applied ParseSettings.normalName() to tag names during tokenization, and TagSet.java called tagName.trim() unconditionally in Tag.valueOf(). A tag name like template (template plus ASCII Record Separator, U+001E) would be trimmed to template at serialization time, causing the parser to assign template's raw-text element semantics. The Safelist checked the original malformed name, which might pass as an allowed tag, while the tree builder treated the normalized name as a structurally different element - closing the gap between what the sanitizer approved and what the browser rendered. The fix (commit 92f1aca5) replaces ParseSettings.normalName() with lowerCase() in Token.java so control characters survive tree construction, and restricts the trim() call in TagSet.java to public API entry points only, where tokenizer-produced names are already delimited.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/jhy/jsoup) PRIMARY 4.7 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.7 MEDIUM

AC:H reflects dual non-default preconditions (custom Safelist + raw-text elements); S:C captures cross-origin XSS; no auth required (PR:N) and no server-side availability impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM
Red Hat 4.7 MEDIUM

Primary rating from Vendor (https://github.com/jhy/jsoup).

CVSS VectorVendor: https://github.com/jhy/jsoup

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2,195 maven packages depend on org.jsoup:jsoup (371 direct, 1,832 indirect)

Ecosystem-wide dependent count for version 1.14.3.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
High
widely used Java HTML parsing library, top Maven Central downloads
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Development Tools 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy