# CVE-2022-21697: SSRF vulnerability (requires authentication)

> Authenticated users can bypass host restrictions to perform server-side request forgery in Jupyter Server Proxy.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Jan 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-gcv9-6737-pjqw, PYSEC-2022-16

## What is CVE-2022-21697?

CVE-2022-21697 is a medium-severity server-side request forgery vulnerability in jupyterhub jupyter-server-proxy, published on 25 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Jupyter Server Proxy is a Jupyter notebook server extension to proxy web services. Versions of Jupyter Server Proxy prior to 3.2.1 are vulnerable to Server-Side Request Forgery (SSRF). Any user deploying Jupyter Server or Notebook with jupyter-proxy-server extension enabled is affected. A lack of input validation allows authenticated clients to proxy requests to other hosts, bypassing the `allowed_hosts` check. Because authentication is required, which already grants permissions to make the same requests via kernel or terminal execution, this is considered low to moderate severity. Users may upgrade to version 3.2.1 to receive a patch or, as a workaround, install the patch manually.

Weakness: CWE-918 (Server-Side Request Forgery)

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

3 open source packages ship an affected version, including jupyter-server-proxy. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyter-server-proxy` | PyPI | All versions | 3.2.1 |
| `jupyter-server-proxy` | PyPI | All versions | 3.2.1 |
| `jupyter-server-proxy` | PyPI | All versions | 3.2.1 |

Products: Jupyter Jupyter Server Proxy.

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

Upgrade jupyter-server-proxy to 3.2.1 or later.

## Is CVE-2022-21697 being exploited?

There is no known exploitation of CVE-2022-21697 in the wild and no public exploit code.

## Other vulnerabilities in jupyterhub jupyter-server-proxy

- [CVE-2024-35225](https://insights.sbomify.com/CVE-2024-35225/): Jupyter Server Proxy has a reflected XSS issue in host parameter (critical 9.7)
- [CVE-2024-28179](https://insights.sbomify.com/CVE-2024-28179/): Jupyter Server Proxy's Websocket Proxying does not require authentication (critical 9.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-21697 is a medium-severity server-side request forgery vulnerability in jupyterhub jupyter-server-proxy, published on 25 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-21697 in the wild and no public exploit code.

Affected packages and fixed versions:
- jupyter-server-proxy (PyPI): affected all versions; fixed in 3.2.1
- jupyter-server-proxy (PyPI): affected all versions; fixed in 3.2.1
- jupyter-server-proxy (PyPI): affected all versions; fixed in 3.2.1

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-21697/ (Markdown: https://insights.sbomify.com/CVE-2022-21697/index.md)
```

## Sources

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

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