# CVE-2022-36033: jsoup may not sanitize Cross-Site Scripting (XSS) attempts if SafeList.preserveRelativeLinks is enabled


- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 29 Aug 2022
- **Updated:** 22 Apr 2025
- **Also known as:** AZL-10740, AZL-36946, CLSA-2026-1784880925, CLSA-2026-1786713516, DEBIAN-CVE-2022-36033, GHSA-gp7f-rwcx-9369, OESA-2024-1255, RHLW-2026-cf15e492f63e9e38, SUSE-SU-2022:4011-1, UBUNTU-CVE-2022-36033, openSUSE-SU-2024:12413-1

## What is CVE-2022-36033?

CVE-2022-36033 is a medium-severity vulnerability in Netapp Oncommand Workflow Automation, published on 29 Aug 2022. 

### Official 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.)

Weakness: CWE-87 (Improper Neutralization of Alternate XSS Syntax), CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2022-36033?

2 open source packages ship an affected version, including org.jsoup:jsoup. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.jsoup:jsoup` | Maven | All versions | 1.15.3 |
| `org.jsoup:jsoup` | Maven | All versions | 1.15.3 |
| `jsoup` | SUSE:Linux Enterprise Module for Development Tools 15 SP3 | All versions | 1.15.3-150200.3.6.1 |
| `jsoup` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 1.15.3-150200.3.6.1 |
| `jsoup` | openSUSE:Leap 15.3 | All versions | 1.15.3-150200.3.6.1 |
| `jsoup` | openSUSE:Leap 15.4 | All versions | 1.15.3-150200.3.6.1 |

Products: Jsoup Jsoup, Netapp Management Services for Element Software, Netapp Management Services for Netapp Hci, Netapp Oncommand Workflow Automation.

## How do I fix CVE-2022-36033?

Upgrade org.jsoup:jsoup to 1.15.3 or later.

## Is CVE-2022-36033 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36033 exists.

## Other vulnerabilities in Netapp Oncommand Workflow Automation

- [CVE-2021-37714](https://insights.sbomify.com/CVE-2021-37714/): Crafted input may cause the jsoup HTML and XML parser to get stuck, timeout, or throw unchecked exceptions (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-36033 and fix it if it is affected.

What it is: CVE-2022-36033 is a medium-severity vulnerability in Netapp Oncommand Workflow Automation, published on 29 Aug 2022. 
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36033 exists.

Affected packages and fixed versions:
- org.jsoup:jsoup (Maven): affected all versions; fixed in 1.15.3
- org.jsoup:jsoup (Maven): affected all versions; fixed in 1.15.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-36033/ (Markdown: https://insights.sbomify.com/CVE-2022-36033/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-36033
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-36033
- OSV: https://osv.dev/vulnerability/CVE-2022-36033

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-36033/
Summaries are generated and may contain mistakes; the official description above is the record.
