CVE-2026-35397: Jupyter Server Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-5789-5fc7-67v3
CVSS 7.1
CWE-22
Published
Advisory Summary

CVE-2026-35397 is a HIGH (CVSS 7.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Jupyter Server libraries in the PyPI ecosystem. The issue involves path traversal via incorrect startswith() root directory check allows access to sibling directories. Remediation is available by upgrading affected packages to version 2.18.0.

CVE-2026-35397 at a Glance

CVE Identifier CVE-2026-35397
GHSA Identifier GHSA-5789-5fc7-67v3
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Jupyter Server
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-35397

To remediate this vulnerability, upgrade all affected Jupyter Server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jupyter-server fixed: 2.18.0
pip install jupyter-server>=2.18.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show jupyter-server

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-35397, inspect your installed packages using pip:

pip show jupyter-server

Analyze the terminal output to locate any version of Jupyter Server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.18.0), your application is affected.

Note: The pip show jupyter-server command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Jupyter Server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Jupyter Server <=2.17.0 can access directories sibling to the root directory, if it starts with the root dir's name. ### PoC Minimal: ``` . ├── test/ <- root directory. │ └── test.txt └── testtest/ └── secret.txt <- file to exfiltrate that we should not be able to access via API ``` ```bash HOST="http://localhost:8888" TOKEN="" SIBLING="testtest" TARGET="secret.txt" curl -s -X POST \ "$HOST/api/contents/%2e%2e/$SIBLING/$TARGET/checkpoints" \ -H "Authorization: token $TOKEN" ``` Full PoC by @stef41: https://gist.github.com/Yann-P/66d4982a965dee8fcb8dd89db29e7006 ### Impact It is possible for an authenticated user to access content outside the server's `root_dir` in siblings directories sharing the same prefix as the `root_dir`. The attacker can escalate access, reading, writing, and deleting from sibling directories. This can have a tangible impact for deployments using predictable naming scheme with multi-tenant server, for example `user1`, `user2`, `user3`, ..., `user10` etc, as `user1` could access and modify files of all `user10` - `user19` and higher. In a hypothetical system where users can choose a name of their folder, an attacker could choose a single-letter username to gain access to a significant number of sibling directories. ### Workarounds Use folder names that do not overlap. ### Acknowledgments Thank you to @stef41 for providing a useful PoC.

CVE-2026-35397 Affected Jupyter Server Versions

1 component(s)
Fixed Versions:
2.18.0
Product / Package Ecosystem Affected Versions Fixed Version
jupyter-server
PyPI
< 2.18.0
2.18.0

References

Frequently Asked Questions

What is CVE-2026-35397?
CVE-2026-35397 is a security vulnerability in Jupyter Server involving Path Traversal via incorrect startswith() root directory check allows access to sibling directories under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Jupyter Server versions are affected?
Affected versions include releases prior to 2.18.0 across affected packages: jupyter-server.
What version fixes CVE-2026-35397?
Upgrading to 2.18.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyter-server affected?
Yes, jupyter-server is affected in releases prior to 2.18.0. Upgrade your dependency to 2.18.0 or later.
What is the CVSS score of CVE-2026-35397?
CVE-2026-35397 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-35397?
CVE-2026-35397 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2026-35397?
Run the dependency tree command: 'pip show jupyter-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5789-5fc7-67v3",
  "modified" : "2026-08-28T18:30:43Z",
  "published" : "2026-05-05T16:49:10Z",
  "aliases" : [ "CVE-2026-35397" ],
  "summary" : "Jupyter Server: Path Traversal via incorrect startswith() root directory check allows access to sibling directories",
  "details" : "### Summary\n\nJupyter Server <=2.17.0 can access directories sibling to the root directory, if it starts with the root dir's name.\n\n### PoC\n\nMinimal:\n\n```\n.\n├── test/              <- root directory.\n│   └── test.txt\n└── testtest/\n    └── secret.txt     <- file to exfiltrate that we should not be able to access via API\n```\n\n```bash\nHOST=\"http://localhost:8888\"\nTOKEN=\"\"\nSIBLING=\"testtest\"\nTARGET=\"secret.txt\"\n\ncurl -s -X POST \\\n  \"$HOST/api/contents/%2e%2e/$SIBLING/$TARGET/checkpoints\" \\\n  -H \"Authorization: token $TOKEN\"\n```\n\nFull PoC by @stef41: https://gist.github.com/Yann-P/66d4982a965dee8fcb8dd89db29e7006\n\n### Impact\n\nIt is possible for an authenticated user to access content outside the server's `root_dir` in siblings directories sharing the same prefix as the `root_dir`. The attacker can escalate access, reading, writing, and deleting from sibling directories.\n\nThis can have a tangible impact for deployments using predictable naming scheme with multi-tenant server, for example `user1`, `user2`, `user3`, ..., `user10` etc, as `user1` could access and modify files of all `user10` - `user19` and higher.\n\nIn a hypothetical system where users can choose a name of their folder, an attacker could choose a single-letter username to gain access to a significant number of sibling directories.\n\n### Workarounds\n\nUse folder names that do not overlap.\n\n### Acknowledgments\n\nThank you to @stef41 for providing a useful PoC.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyter-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.18.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.17.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyter-server/jupyter_server/security/advisories/GHSA-5789-5fc7-67v3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35397"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:43038"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:60520"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-35397"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2466858"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyter-server/jupyter_server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyter-server/PYSEC-2026-68.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-35397.json"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T16:49:10Z",
    "nvd_published_at" : "2026-05-05T20:16:38Z"
  }
}