GHSA-pmhh-3w7g-xqp8

Suggest an improvement
Source
https://github.com/advisories/GHSA-pmhh-3w7g-xqp8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-pmhh-3w7g-xqp8/GHSA-pmhh-3w7g-xqp8.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-pmhh-3w7g-xqp8
Aliases
Downstream
Published
2026-08-06T21:09:36Z
Modified
2026-08-06T21:26:12Z
Severity
  • 4.7 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
jsoup: Cleaner may expose markup with custom raw-text elements
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-06T21:09:36Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
}
References

Affected packages

Maven / org.jsoup:jsoup

Package

Name
org.jsoup:jsoup
View open source insights on deps.dev
Purl
pkg:maven/org.jsoup/jsoup

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.14.3
Fixed
1.23.1

Affected versions

1.*
1.14.3
1.15.1
1.15.2
1.15.3
1.15.4
1.16.1
1.16.2
1.17.1
1.17.2
1.18.1
1.18.2
1.18.3
1.19.1
1.20.1
1.21.1
1.21.2
1.22.1
1.22.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-pmhh-3w7g-xqp8/GHSA-pmhh-3w7g-xqp8.json"