Regular Expression without Anchors Affecting jupyter-server package, versions [,2.18.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-JUPYTERSERVER-16425699
  • published6 May 2026
  • disclosed5 May 2026
  • creditvnykmshr

Introduced: 5 May 2026

CVE-2026-40110  (opens in a new tab)
CWE-777  (opens in a new tab)

How to fix?

Upgrade jupyter-server to version 2.18.0 or higher.

Overview

Affected versions of this package are vulnerable to Regular Expression without Anchors through the allow_origin_pat checks in websocket.py, login.py. An attacker can bypass CORS, WebSocket origin checks, and login redirect validation by supplying an Origin or Referer value that matches the configured pattern only as a prefix, such as a trusted hostname followed by attacker-controlled suffixes. This lets a malicious site make authenticated requests or steer redirects to an attacker-controlled origin, exposing user data and enabling cross-site actions in deployments that rely on allow_origin_pat for origin restrictions.

Workarounds

  • Wrap your allow_origin_pat value with ^ and $ so it matches the full origin string instead of only a prefix; this prevents attacker-controlled origins like trusted.example.com.evil.com from passing origin validation.

CVSS Base Scores

version 4.0
version 3.1