# CVE-2026-5422: Path Traversal in jupyter/jupyter

> Attackers can bypass directory restrictions to read or modify files in sibling directories, exposing sensitive data in shared environments.

- **Severity:** Medium 6.8 (`CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Jun 2026
- **Updated:** 2 Jun 2026
- **Also known as:** DEBIAN-CVE-2026-5422, GHSA-gf7q-q4j7-hp7c, PYSEC-2026-2532, UBUNTU-CVE-2026-5422, openSUSE-SU-2026:10972-1

## What is CVE-2026-5422?

CVE-2026-5422 is a medium-severity path traversal vulnerability in jupyter/jupyter, published on 2 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A path traversal vulnerability exists in jupyter-server version 2.17.0 due to an incorrect root directory boundary check in the _get_os_path() function within jupyter_server/services/contents/fileio.py. The check uses startswith(root) without appending a trailing path separator, allowing sibling directories with names starting with the same prefix as root_dir to bypass the check. Additionally, the to_os_path() function in utils.py does not strip ".." from path parts, enabling traversal sequences to bypass the vulnerable check. This vulnerability can lead to unauthorized read/write access to files in sibling directories, potentially exposing sensitive data in shared hosting environments.

Weakness: CWE-23 (Relative Path Traversal)

## Which versions are affected by CVE-2026-5422?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyter-server` | PyPI | All versions | 2.18.2 |
| `jupyter-server` | PyPI | All versions | 2.18.2 |
| `jupyter-server` | PyPI | All versions | 2.18.2 |
| `python-jupyter-server` | openSUSE:Tumbleweed | All versions | 2.19.0-1.1 |

Products: Jupyter Jupyter Server.

## How do I fix CVE-2026-5422?

Upgrade jupyter-server to 2.18.2 or later.

## Is CVE-2026-5422 being exploited?

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

## Other vulnerabilities in jupyter/jupyter

- [CVE-2026-44727](https://insights.sbomify.com/CVE-2026-44727/): Jupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSP (critical 9.3)
- [CVE-2026-35397](https://insights.sbomify.com/CVE-2026-35397/): jupyter-server path traversal allows access to sibling directories sharing root_dir name prefix (high 7.6)
- [CVE-2026-40110](https://insights.sbomify.com/CVE-2026-40110/): jupyter-server CORS origin validation bypass via unanchored regex in allow_origin_pat (high 7.6)
- [CVE-2026-40934](https://insights.sbomify.com/CVE-2026-40934/): jupyter-server authentication cookies remain valid after password reset due to static cookie secret (high 7.6)
- [CVE-2024-35178](https://insights.sbomify.com/CVE-2024-35178/): Jupyter server on Windows discloses Windows user password hash (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-5422 and fix it if it is affected.

What it is: CVE-2026-5422 is a medium-severity path traversal vulnerability in jupyter/jupyter, published on 2 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-5422 exists.

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

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

## Sources

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

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