CVE-2026-6657 in jupyter-server
Summary
by MITRE • 06/03/2026
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.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 06/04/2026
This vulnerability exists within jupyter-server versions 1.12.0 through 2.17.0 and represents a critical cross-origin resource sharing (CORS) bypass flaw that undermines the security controls designed to protect web applications from unauthorized cross-origin requests. The issue stems from improper implementation of origin validation logic that relies on regular expression matching without proper anchoring, creating a fundamental weakness in the server's security architecture that can be exploited by malicious actors to circumvent intended access controls.
The technical flaw manifests in the use of re.match() function for validating the Origin header against configured patterns, where the regular expression matching only anchors at the beginning of the string rather than anchoring at both the start and end. This design flaw allows attackers to craft malicious domain names that can pass validation checks by appending their malicious domain to a legitimate trusted domain, such as constructing the domain `trusted.example.com.evil.com` which would match a pattern designed to validate `trusted.example.com`. This behavior directly violates the intended security boundaries and creates a pathway for unauthorized access to protected resources.
The operational impact of this vulnerability extends across multiple components within the jupyter-server codebase, affecting CORS headers, WebSocket connections, referer validation, and login redirect mechanisms. This widespread exposure creates multiple attack vectors that can be leveraged by threat actors to execute phishing attacks, gain unauthorized access to sensitive API responses, and potentially achieve arbitrary code execution within the server environment. The vulnerability essentially undermines the entire CORS security model by allowing attackers to spoof trusted origins and bypass authentication mechanisms that should prevent cross-origin access.
Security implications of this vulnerability align with CWE-284 (Improper Access Control) and CWE-346 (Origin Validation) categories, representing a significant weakness in the server's ability to enforce proper access controls and validate source origins. The attack surface is further expanded when considering ATT&CK framework mappings to techniques such as T1566 (Phishing) and T1071.001 (Application Layer Protocol: Web Protocols), as the vulnerability enables attackers to craft convincing phishing campaigns that can bypass security controls. The exploitation potential is particularly concerning given that jupyter-server is commonly used in environments where sensitive data processing occurs, making the compromise of these security controls particularly dangerous for organizations relying on the platform for research, development, or data analysis workloads.
The recommended mitigations include upgrading to jupyter-server versions that have addressed this vulnerability by implementing proper anchoring of regular expressions for origin validation, ensuring that all origin checks use re.fullmatch() or equivalent functions that anchor at both beginning and end of strings. Organizations should also implement additional security controls such as strict Content Security Policy headers, regular security audits of CORS configurations, and monitoring for suspicious origin patterns in server logs. Additionally, administrators should review and tighten their allow_origin_pat configurations to minimize the attack surface and implement proper input validation for all user-supplied origin values to prevent similar issues from occurring in other components of the application stack.