CVE-2026-40110: Jupyter Server CORS Origin Validation Bypass Vulnerability
Summary
CVE-2026-40110: Jupyter Server has a CORS Origin Validation Bypass via re.match() in allow_origin_pat (from huntr). Affects jupyter-server versions < 2.18.0. Fixed in 2.18.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Jupyter Server is an open-source web application that allows users to create and share documents containing live code, equations, visualizations, and narrative text. It is widely used in data science and academic research for interactive computing. The server facilitates communication between the user interface and the underlying computational kernels. However, it has a vulnerability related to Cross-Origin Resource Sharing (CORS) that can be exploited if not properly configured.
Vulnerability Detail
The vulnerability arises from the use of the re.match() function in Jupyter Server to validate the Origin header against the allow_origin_pat configuration. Since re.match() only checks for a match at the start of the string, an attacker can craft a malicious domain such as 'http://trusted.example.com.evil.com/' that passes validation. This could allow unauthorized access to resources, leading to potential data leaks or other security breaches. The affected versions are those prior to 2.18.0.
How To Fix
Latest published version: 2.21.1 as of 23 Oct 2026
pip install --upgrade "jupyter-server==2.21.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.18.0
This is the first release that contains the fix.
pip install --upgrade "jupyter-server==2.18.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can modify your allow_origin_pat configuration by wrapping its value with ^ and $ to ensure that it matches the entire string. For example: 'allow_origin_pat = ^https://trusted.example.com$'. This adjustment will prevent the bypass by enforcing stricter validation.
Conclusion
The Jupyter Server CORS Origin Validation Bypass vulnerability (CVE-2026-40110) poses a significant risk to users running affected versions. It is crucial to update to version 2.18.0 or later to protect against potential exploitation. Alternatively, applying the recommended workaround can provide temporary relief until an update can be performed.
See every vulnerability recorded for jupyter-server →
FAQ
The CVSS score of this vulnerability is 7.6, indicating a high severity level.
Versions of Jupyter Server prior to 2.18.0 are affected by this vulnerability.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
CORS stands for Cross-Origin Resource Sharing, a security feature that allows or restricts resources requested from another domain.
If you cannot update immediately, implement the workaround by adjusting your allow_origin_pat configuration to mitigate the risk.
References
Related vulnerabilities
Recent vulnerabilities recorded for jupyter-server.