# CVE-2026-5422: Jupyter jupyter-server path traversal in _get_os_path

Source: https://junglewise.ai/threats/cve-2026-5422-jupyter-jupyter-server-path-traversal-in-get-os-path  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-02. Updated: 2026-07-09  
License: CC BY 4.0 with a link back

CVE-2026-5422 · Severity: medium · CVSS 6.8 · Published 2026-06-02

Jupyter Server, a core component of the Jupyter ecosystem used to run interactive notebooks, is vulnerable to a security flaw that allows unauthorized access to files. An attacker with basic user permissions could bypass directory restrictions to read or write files in folders they should not have access to. This could lead to the exposure of sensitive data or the modification of system files in shared hosting environments.

Technologies: [jupyter-server (PyPI)](https://junglewise.ai/threats/technologies/pypi-jupyter-server). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-5422 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-5422 being exploited in the wild.

**How severe is CVE-2026-5422?** Medium severity, with a CVSS score of 6.8, published 2 June 2026.

**Which products and versions are affected?** jupyter-server (PyPI) ECOSYSTEM:introduced=0,fixed=2.18.2.

**Is there a fix for CVE-2026-5422?** Yes. jupyter-server (PyPI): upgrade to 2.18.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-5422 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-5422?** Check whether you run jupyter-server (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- jupyter-server (PyPI): upgrade to 2.18.2 or later

  ```sh
  pip install "jupyter-server>=2.18.2"
  ```


## Technical details

A path traversal vulnerability exists in jupyter-server versions prior to 2.18.2. The root cause is an insufficient boundary check in the `_get_os_path()` function within `fileio.py`, which uses `startswith(root)` without a trailing path separator. This allows sibling directories sharing the same prefix as the `root_dir` to bypass security checks. Furthermore, the `to_os_path()` utility fails to strip '..' sequences, facilitating traversal. An authenticated attacker with network access can exploit this to achieve unauthorized read and write access to files outside the intended root directory. The issue is addressed in version 2.18.2.

## Affected products

- Jupyter jupyter-server < 2.18.2

## Identifiers

- CVE-2026-5422
- GHSA-gf7q-q4j7-hp7c
- PYSEC-2026-2532

## Timeline

- 2026-06-02: disclosed
- 2026-06-02: advisory
- 2026-07-09: patched

## References

- [https://huntr.com/bounties/24a36953-6490-466f-8cb2-a90d1ca56e0f](https://huntr.com/bounties/24a36953-6490-466f-8cb2-a90d1ca56e0f)
- [http://github.com/jupyter-server/jupyter_server/commit/0d829f2c35a481c3b24ecbe1e25a6f79954e88f2](http://github.com/jupyter-server/jupyter_server/commit/0d829f2c35a481c3b24ecbe1e25a6f79954e88f2)

## Related threats

- [Jupyter Server authorization bypass in kernel gateway handlers](https://junglewise.ai/threats/cve-2026-114135-jupyter-server-is-the-backend-for-jupyter-web-applications-from)
- [Jupyter Server token leakage in 5xx error logs](https://junglewise.ai/threats/cve-2026-86049-jupyter-server-token-leakage-in-5xx-error-logs)
- [Jupyter Server stored XSS in nbconvert handlers](https://junglewise.ai/threats/cve-2026-44727-jupyter-server-stored-xss-in-nbconvert-handlers)
- [Jupyter Jupyter Server CORS bypass via improper origin validation](https://junglewise.ai/threats/cve-2026-6657-jupyter-jupyter-server-cors-bypass-via-improper-origin-validation)
- [Jupyter Server insufficient session expiration after password reset](https://junglewise.ai/threats/cve-2026-40934-jupyter-server-insufficient-session-expiration-after-password)
