CVE-2022-36033: jsoup may not sanitize Cross-Site Scripting (XSS) attempts if SafeList.preserveRelativeLinks is enabled
Vulnerability summary
CVE-2022-36033 is a medium (CVSS 6.1) vulnerability in jhy jsoup. EPSS estimates a 1.64% chance of exploitation in the next 30 days, higher than 76.4% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3 · Related 2Timeline
- 29-08-2022PublishedVulnerability first disclosed.
- 22-04-2025Last modifiedVulnerability information updated.
Description
jsoup is a Java HTML parser, built for HTML editing, cleaning, scraping, and cross-site scripting (XSS) safety. jsoup may incorrectly sanitize HTML including `javascript:` URL expressions, which could allow XSS attacks when a reader subsequently clicks that link. If the non-default `SafeList.preserveRelativeLinks` option is enabled, HTML including `javascript:` URLs that have been crafted with control characters will not be sanitized. If the site that this HTML is published on does not set a Content Security Policy, an XSS attack is then possible. This issue is patched in jsoup 1.15.3. Users should upgrade to this version. Additionally, as the unsanitized input may have been persisted, old content should be cleaned again using the updated version. To remediate this issue without immediately upgrading: - disable `SafeList.preserveRelativeLinks`, which will rewrite input URLs as absolute URLs - ensure an appropriate [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) is defined. (This should be used regardless of upgrading, as a defence-in-depth best practice.)
CVSS metrics
6 scores · 6 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · MavenEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
1.64%
Chance of exploitation in the next 30 days
Percentile
76%
Versus all other CVEs
30-day change
Increase +0.10 pp
From 1.54% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundJsoup
Maturity: poc
Weaknesses
CWE · root cause- CWE-79Improper Neutralization of Input During Web Page GenerationThe product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-87Improper Neutralization of Alternate XSS SyntaxThe product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard7 products
- eco-java-gradle-7.5All versions (No fix recorded)
- eco-java-gradle-7.5.1All versions (No fix recorded)
- eco-java-gradle-7.6All versions (No fix recorded)
- eco-java-gradle-7.6.1All versions (No fix recorded)
- hadoop-fips-3.3.6< 3.3.6-r15 | < 3.3.6-r21
Netapp3 products
Opensuse2 products
- jsoup&distro=openSUSE Leap 15.3< 1.15.3-150200.3.6.1
- jsoup&distro=openSUSE Leap 15.4< 1.15.3-150200.3.6.1
Suse2 products
- jsoup&distro=SUSE Linux Enterprise Module for Development Tools 15 SP3< 1.15.3-150200.3.6.1
- jsoup&distro=SUSE Linux Enterprise Module for Development Tools 15 SP4< 1.15.3-150200.3.6.1
Debian1 product
- jsoup< 1.15.3-1
Jhy1 product
- jsoup< 1.15.3
Jsoup1 product
- jsoup< 1.15.3
Org.jsoup1 product
- jsoup< 1.15.3
Ubuntu1 product
- jsoupAll versions (No fix recorded)
9 vendors · 19 products
References
14 links- github.com/jhy/jsoup/security/advisories/GHSA-gp7f-rwcx-9369REPORTAdvisoryWEBExploitThird Party Advisory
Show all 14 references
- github.com/jhy/jsoupPACKAGE