# CVE-2026-6657: CORS Origin Validation Bypass in jupyter-server

> Attackers can bypass CORS validation in Jupyter Server when using regex patterns, enabling phishing, code execution, and data theft.

- **Severity:** Medium 6.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 3 Jun 2026
- **Updated:** 3 Jun 2026
- **Also known as:** DEBIAN-CVE-2026-6657, GHSA-v42x-x7jp-845h, PYSEC-2026-3472, UBUNTU-CVE-2026-6657

## What is CVE-2026-6657?

CVE-2026-6657 is a medium-severity vulnerability in jupyter/jupyter, published on 3 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A vulnerability in jupyter-server versions 1.12.0 through 2.17.0 allows an attacker to bypass CORS origin validation when the `allow_origin_pat` configuration is used. The issue arises from the use of `re.match()` for validating the `Origin` header, which only anchors at the start of the string. This allows attacker-controlled domains such as `trusted.example.com.evil.com` to pass validation against patterns intended to match `trusted.example.com`. The vulnerability affects multiple locations in the codebase, including CORS headers, WebSocket connections, referer validation, and login redirects, potentially enabling phishing attacks, arbitrary code execution, and unauthorized access to sensitive API responses.

Weakness: CWE-346 (Origin Validation Error)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyter-server` | PyPI | From 1.12.0 to 2.17.0 | None |
| `jupyter-server` | PyPI | From 1.12.0 to 2.17.0 | None |
| `jupyter-server` | PyPI | From 1.12.0 to 2.17.0 | None |

Products: Jupyter Jupyter Server.

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

No fix has been published for CVE-2026-6657 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-6657 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-6657 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-6657 and fix it if it is affected.

What it is: CVE-2026-6657 is a medium-severity vulnerability in jupyter/jupyter, published on 3 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-6657 exists.

Affected packages and fixed versions:
- jupyter-server (PyPI): affected from 1.12.0 up to 2.17.0; no fix listed
- jupyter-server (PyPI): affected from 1.12.0 up to 2.17.0; no fix listed
- jupyter-server (PyPI): affected from 1.12.0 up to 2.17.0; no fix listed

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

## Sources

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

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