{"id":"CVE-2022-36033","published":"2022-08-29T00:00:00Z","modified":"2025-04-22T17:41:13Z","title":"jsoup may not sanitize Cross-Site Scripting (XSS) attempts if SafeList.preserveRelativeLinks is enabled","vendor":"jhy","product":"jsoup","tier":"tail","description":{"text":"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.)","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01692,"percentile":0.77652,"provenance":"source"},"cwes":[{"id":"CWE-87","name":"Improper Neutralization of Alternate XSS Syntax"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/jhy/jsoup/security/advisories/GHSA-gp7f-rwcx-9369","tags":[]},{"url":"https://github.com/jhy/jsoup/releases/tag/jsoup-1.15.3","tags":[]},{"url":"https://jsoup.org/news/release-1.15.3","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20221104-0006/","tags":[]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":15.53},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"jhy","affectedVersions":[{"vendor":"jhy","product":"jsoup","versions":["< 1.15.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:44:56.200275Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.jsoup:jsoup","vulnerableRanges":["<1.15.3"],"patched":["1.15.3"],"from":["GHSA-gp7f-rwcx-9369"],"provenance":"source"}],"summary":{"text":"The jsoup Java HTML parser's HTML sanitizer fails to neutralize javascript: URLs containing control characters when the non-default SafeList.preserveRelativeLinks option is enabled, so such links pass through unsanitized. An unauthenticated remote attacker can exploit this by supplying crafted HTML that a reader must click, leading to cross-site scripting on a site that does not set a Content Security Policy.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:17:29Z"},"euvd":{"id":"EUVD-2022-6828","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2015-6748","published":"2017-09-25","fixed":"1.8.3","kev":false},{"cve":"CVE-2021-37714","published":"2021-08-18","fixed":"1.14.2","kev":false,"link":{"from":"CVE-2021-37714","to":"CVE-2022-36033","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.jsoup:jsoup","fromFixed":"1.14.2","toFixed":"1.15.3","daysApart":376}]}},{"cve":"CVE-2022-36033","published":"2022-08-29","fixed":"1.15.3","kev":false},{"cve":"CVE-2026-71497","published":"2026-08-06","fixed":"1.23.1","kev":false},{"cve":"CVE-2026-75140","published":"2026-08-20","fixed":"1.23.2","kev":false}],"package":"Maven:org.jsoup:jsoup"}}