{"id":"CVE-2026-21883","aliases":["EUVD-2026-1036","GHSA-793v-589g-574v","PYSEC-2026-1223"],"status":"published","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"Bokeh is an interactive visualization library written in Python. In versions 3.8.1 and below, if a server is configured with an allowlist (e.g., dashboard.corp), an attacker can register a domain like dashboard.corp.attacker.com (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., http://dashboard.corp.attacker.com/) matches the allowlist according to the flawed logic, the connection is accepted. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations. This issue is fixed in version 3.8.2.","severity":{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00176,"percentile":0.0718,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1385"],"published":"2026-01-06T17:53:44Z","modified":"2026-10-28T02:30:26Z","fixes":[{"ecosystem":"PyPI","package":"bokeh","fixed_in":["3.8.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"bokeh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.8.2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"bokeh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.8.2"}]}],"versions":["0.10.0","0.11.0","0.11.1","0.12.0","0.12.1","0.12.10","0.12.11","0.12.13","0.12.14","0.12.15","0.12.16","0.12.2","0.12.3","0.12.4","0.12.5","0.12.6","0.12.7","0.12.9","0.13.0","0.2","0.3","0.4","0.4.1","0.4.4","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.7.1","0.8.0","0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.9.3","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.2.0","1.3.0","1.3.1","1.3.2","1.3.4","1.4.0","2.0.0","2.0.0rc1","2.0.0rc2","2.0.1","2.0.2","2.1.0","2.1.0rc1","2.1.0rc2","2.1.0rc3","2.1.1","2.2.0","2.2.0.dev4","2.2.0.dev6","2.2.0.dev7","2.2.0.dev8","2.2.0rc1","2.2.0rc2","2.2.0rc3","2.2.1","2.2.2","2.2.3","2.3.0","2.3.0.dev1","2.3.0.dev10","2.3.0.dev11","2.3.0.dev12","2.3.0.dev13","2.3.0.dev14","2.3.0.dev2","2.3.0.dev3","2.3.0.dev5","2.3.0.dev7","2.3.0.dev8","2.3.0.dev9","2.3.0rc2","2.3.0rc3","2.3.0rc4","2.3.1","2.3.1.dev1","2.3.1rc1","2.3.1rc2","2.3.2","2.3.2rc1","2.3.3","2.3.3rc1","2.4.0","2.4.0.dev1","2.4.0.dev2","2.4.0.dev4","2.4.0.dev5","2.4.0.dev6","2.4.0.dev7","2.4.0.dev8","2.4.0rc1","2.4.0rc2","2.4.0rc3","2.4.1","2.4.1rc1","2.4.2","2.4.2.dev1","2.4.2rc1","2.4.3","2.4.3.dev1","2.4.3.dev3","2.4.3.dev4","2.4.3rc1","3.0.0","3.0.0.dev1","3.0.0.dev10","3.0.0.dev11","3.0.0.dev13","3.0.0.dev14","3.0.0.dev15","3.0.0.dev16","3.0.0.dev17","3.0.0.dev18","3.0.0.dev19","3.0.0.dev2","3.0.0.dev20","3.0.0.dev3","3.0.0.dev4","3.0.0.dev5","3.0.0.dev6","3.0.0.dev7","3.0.0.dev8","3.0.0.dev9","3.0.0rc1","3.0.0rc2","3.0.0rc3","3.0.0rc4","3.0.0rc5","3.0.0rc6","3.0.1","3.0.1rc1","3.0.2","3.0.2rc1","3.0.3","3.0.3rc1","3.1.0","3.1.0.dev1","3.1.0.dev2","3.1.0.dev3","3.1.0.dev4","3.1.0.dev5","3.1.0rc1","3.1.0rc2","3.1.0rc3","3.1.1","3.1.1rc1","3.2.0","3.2.0.dev1","3.2.0.dev2","3.2.0.dev3","3.2.0.dev4","3.2.0rc1","3.2.0rc2","3.2.0rc3","3.2.1","3.2.2","3.2.2rc1","3.3.0","3.3.0.dev1","3.3.0.dev2","3.3.0.dev3","3.3.0rc1","3.3.0rc2","3.3.0rc3","3.3.1","3.3.1.dev1","3.3.1rc1","3.3.2","3.3.3","3.3.4","3.3.4rc1","3.4.0","3.4.0.dev1","3.4.0.dev2","3.4.0.dev3","3.4.0.dev4","3.4.0.dev5","3.4.0.dev6","3.4.0.dev7","3.4.0.dev8","3.4.0rc1","3.4.0rc2","3.4.1","3.4.2","3.4.3","3.5.0","3.5.0.dev1","3.5.0.dev3","3.5.0.dev4","3.5.0.dev5","3.5.0.dev6","3.5.0.dev7","3.5.0.dev8","3.5.0rc1","3.5.0rc2","3.5.1","3.5.2","3.6.0","3.6.0.dev1","3.6.0rc1","3.6.0rc2","3.6.1","3.6.2","3.6.3","3.6.3rc1","3.6.3rc2","3.7.0","3.7.0.dev1","3.7.0.dev2","3.7.0.dev3","3.7.0.dev4","3.7.0.dev5","3.7.0.dev6","3.7.0.dev7","3.7.0.dev8","3.7.0.dev9","3.7.0rc1","3.7.0rc2","3.7.1","3.7.2","3.7.3","3.7.3rc1","3.7.3rc2","3.8.0","3.8.0.dev1","3.8.0.dev2","3.8.0.dev3","3.8.0.dev4","3.8.0rc1","3.8.0rc2","3.8.1"]},{"source":"osv","ecosystem":"PyPI","package":"bokeh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.8.2"}]}],"versions":["0.10.0","0.11.0","0.11.1","0.12.0","0.12.1","0.12.10","0.12.11","0.12.13","0.12.14","0.12.15","0.12.16","0.12.2","0.12.3","0.12.4","0.12.5","0.12.6","0.12.7","0.12.9","0.13.0","0.2","0.3","0.4","0.4.1","0.4.4","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.7.1","0.8.0","0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.9.3","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.2.0","1.3.0","1.3.1","1.3.2","1.3.4","1.4.0","2.0.0","2.0.0rc1","2.0.0rc2","2.0.1","2.0.2","2.1.0","2.1.0rc1","2.1.0rc2","2.1.0rc3","2.1.1","2.2.0","2.2.0.dev4","2.2.0.dev6","2.2.0.dev7","2.2.0.dev8","2.2.0rc1","2.2.0rc2","2.2.0rc3","2.2.1","2.2.2","2.2.3","2.3.0","2.3.0.dev1","2.3.0.dev10","2.3.0.dev11","2.3.0.dev12","2.3.0.dev13","2.3.0.dev14","2.3.0.dev2","2.3.0.dev3","2.3.0.dev5","2.3.0.dev7","2.3.0.dev8","2.3.0.dev9","2.3.0rc2","2.3.0rc3","2.3.0rc4","2.3.1","2.3.1.dev1","2.3.1rc1","2.3.1rc2","2.3.2","2.3.2rc1","2.3.3","2.3.3rc1","2.4.0","2.4.0.dev1","2.4.0.dev2","2.4.0.dev4","2.4.0.dev5","2.4.0.dev6","2.4.0.dev7","2.4.0.dev8","2.4.0rc1","2.4.0rc2","2.4.0rc3","2.4.1","2.4.1rc1","2.4.2","2.4.2.dev1","2.4.2rc1","2.4.3","2.4.3.dev1","2.4.3.dev3","2.4.3.dev4","2.4.3rc1","3.0.0","3.0.0.dev1","3.0.0.dev10","3.0.0.dev11","3.0.0.dev13","3.0.0.dev14","3.0.0.dev15","3.0.0.dev16","3.0.0.dev17","3.0.0.dev18","3.0.0.dev19","3.0.0.dev2","3.0.0.dev20","3.0.0.dev3","3.0.0.dev4","3.0.0.dev5","3.0.0.dev6","3.0.0.dev7","3.0.0.dev8","3.0.0.dev9","3.0.0rc1","3.0.0rc2","3.0.0rc3","3.0.0rc4","3.0.0rc5","3.0.0rc6","3.0.1","3.0.1rc1","3.0.2","3.0.2rc1","3.0.3","3.0.3rc1","3.1.0","3.1.0.dev1","3.1.0.dev2","3.1.0.dev3","3.1.0.dev4","3.1.0.dev5","3.1.0rc1","3.1.0rc2","3.1.0rc3","3.1.1","3.1.1rc1","3.2.0","3.2.0.dev1","3.2.0.dev2","3.2.0.dev3","3.2.0.dev4","3.2.0rc1","3.2.0rc2","3.2.0rc3","3.2.1","3.2.2","3.2.2rc1","3.3.0","3.3.0.dev1","3.3.0.dev2","3.3.0.dev3","3.3.0rc1","3.3.0rc2","3.3.0rc3","3.3.1","3.3.1.dev1","3.3.1rc1","3.3.2","3.3.3","3.3.4","3.3.4rc1","3.4.0","3.4.0.dev1","3.4.0.dev2","3.4.0.dev3","3.4.0.dev4","3.4.0.dev5","3.4.0.dev6","3.4.0.dev7","3.4.0.dev8","3.4.0rc1","3.4.0rc2","3.4.1","3.4.2","3.4.3","3.5.0","3.5.0.dev1","3.5.0.dev3","3.5.0.dev4","3.5.0.dev5","3.5.0.dev6","3.5.0.dev7","3.5.0.dev8","3.5.0rc1","3.5.0rc2","3.5.1","3.5.2","3.6.0","3.6.0.dev1","3.6.0rc1","3.6.0rc2","3.6.1","3.6.2","3.6.3","3.6.3rc1","3.6.3rc2","3.7.0","3.7.0.dev1","3.7.0.dev2","3.7.0.dev3","3.7.0.dev4","3.7.0.dev5","3.7.0.dev6","3.7.0.dev7","3.7.0.dev8","3.7.0.dev9","3.7.0rc1","3.7.0rc2","3.7.1","3.7.2","3.7.3","3.7.3rc1","3.7.3rc2","3.8.0","3.8.0.dev1","3.8.0.dev2","3.8.0.dev3","3.8.0.dev4","3.8.0rc1","3.8.0rc2","3.8.1"]}],"products":[{"vendor":"bokeh","product":"bokeh"}],"references":[{"url":"https://github.com/bokeh/bokeh/security/advisories/GHSA-793v-589g-574v","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/bokeh/bokeh/commit/cedd113b0e271b439dce768671685cf5f861812e","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://aydinnyunus.github.io/2026/01/24/bokeh-websocket-hijacking-cve-2026-21883/","tags":["Exploit","Mitigation","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-21883","tags":["advisory"]},{"url":"https://aydinnyunus.github.io/2026/01/24/bokeh-websocket-hijacking-cve-2026-21883","tags":["web"]},{"url":"https://github.com/advisories/GHSA-793v-589g-574v","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21883.json","tags":["advisory"]},{"url":"https://github.com/bokeh/bokeh","tags":["package"]},{"url":"https://pypi.org/project/bokeh","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-21883","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"Bokeh is an interactive visualization library written in Python. In versions 3.8.1 and below, if a server is configured with an allowlist (e.g., dashboard.corp), an attacker can register a domain like dashboard.corp.attacker.com (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., http://dashboard.corp.attacker.com/) matches the allowlist according to the flawed logic, the connection is accepted. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations. This issue is fixed in version 3.8.2.","status":"published","published":"2026-01-08T01:20:53.479Z","modified":"2026-01-23T15:09:19.266Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium","assessor":"cna"}],"cwes":["CWE-1385"],"updated_at":"2026-11-02T13:41:42.05254Z"}],"euvd":[{"id":"EUVD-2026-1036","description":"Bokeh is an interactive visualization library written in Python. In versions 3.8.1 and below, if a server is configured with an allowlist (e.g., dashboard.corp), an attacker can register a domain like dashboard.corp.attacker.com (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., http://dashboard.corp.attacker.com/) matches the allowlist according to the flawed logic, the connection is accepted. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations. This issue is fixed in version 3.8.2.","status":"published","published":"2026-01-08T01:20:53Z","modified":"2026-01-23T15:09:19Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium"}],"updated_at":"2026-11-02T19:48:48.084617Z"}],"ghsa":[{"id":"GHSA-793v-589g-574v","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"This vulnerability allows for **Cross-Site WebSocket Hijacking (CSWSH)** of a deployed Bokeh server instance. \n\n### Scope\n\nThis vulnerability is only relevant to deployed Bokeh server instances. There is no impact on static HTML output, standalone embedded plots, or Jupyter notebook usage. \n\nThis vulnerability does not prevent any requirements for up-front authentication on Bokeh servers that have authentication hooks in place, and cannot be used to make Bokeh servers deployed on private, internal networks accessible outside those networks. \n\n### Impact\n\nIf a Bokeh server is configured with an allowlist (e.g., `dashboard.corp`), an attacker can register a domain like `dashboard.corp.attacker.com` (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., `http://dashboard.corp.attacker.com/`) matches the allowlist according to the flawed logic, the connection is accepted.\n\nOnce connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations.\n\n### Patches\nPatched in versions 3.8.2 and later.\n\n### Workarounds\n\nNone\n\n### Technical description\n\nThe `match_host` function in `src/bokeh/server/util.py` contains a flaw in how it compares hostnames against the allowlist patterns. The function uses Python's `zip()` function to iterate over the parts of the hostname and the pattern simultaneously. However, `zip()` stops iteration when the shortest iterable is exhausted.\n\nBecause the code only checks if the *pattern* is longer than the *host* (lines 232-233), but fails to check if the *host* is longer than the *pattern*, a host that **starts** with the pattern (but has additional segments) will successfully match.\n\nFor example, if the allowlist is configured to `['[example.com](http://example.com/)']`, the function will incorrectly validate `[example.com.bad.com](http://example.com.evil.com/)` as a match:\n1. `host` parts: `['example', 'com', 'bad', 'com']`\n2. `pattern` parts: `['example', 'com']`\n3. `zip` compares `example==example` (OK) and `com==com` (OK).\n4. Iteration stops, and the function returns `True`.","status":"published","published":"2026-01-06T17:53:44Z","modified":"2026-01-23T16:39:06Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium"}],"cwes":["CWE-1385"],"updated_at":"2026-11-02T14:39:19.525691Z"}],"nvd":[{"id":"CVE-2026-21883","description":"Bokeh is an interactive visualization library written in Python. In versions 3.8.1 and below, if a server is configured with an allowlist (e.g., dashboard.corp), an attacker can register a domain like dashboard.corp.attacker.com (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., http://dashboard.corp.attacker.com/) matches the allowlist according to the flawed logic, the connection is accepted. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations. This issue is fixed in version 3.8.2.","status":"published","published":"2026-01-08T02:15:53.95Z","modified":"2026-06-17T10:19:05.17Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-1385"],"updated_at":"2026-11-02T14:12:03.683495Z"}],"osv":[{"id":"CVE-2026-21883","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"Bokeh is an interactive visualization library written in Python. In versions 3.8.1 and below, if a server is configured with an allowlist (e.g., dashboard.corp), an attacker can register a domain like dashboard.corp.attacker.com (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., http://dashboard.corp.attacker.com/) matches the allowlist according to the flawed logic, the connection is accepted. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations. This issue is fixed in version 3.8.2.","status":"published","published":"2026-01-08T01:20:53.479Z","modified":"2026-10-28T02:30:26.281697128Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium"}],"cwes":["CWE-1385"],"updated_at":"2026-11-02T15:44:58.42038Z"},{"id":"GHSA-793v-589g-574v","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"This vulnerability allows for **Cross-Site WebSocket Hijacking (CSWSH)** of a deployed Bokeh server instance. \n\n### Scope\n\nThis vulnerability is only relevant to deployed Bokeh server instances. There is no impact on static HTML output, standalone embedded plots, or Jupyter notebook usage. \n\nThis vulnerability does not prevent any requirements for up-front authentication on Bokeh servers that have authentication hooks in place, and cannot be used to make Bokeh servers deployed on private, internal networks accessible outside those networks. \n\n### Impact\n\nIf a Bokeh server is configured with an allowlist (e.g., `dashboard.corp`), an attacker can register a domain like `dashboard.corp.attacker.com` (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., `http://dashboard.corp.attacker.com/`) matches the allowlist according to the flawed logic, the connection is accepted.\n\nOnce connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations.\n\n### Patches\nPatched in versions 3.8.2 and later.\n\n### Workarounds\n\nNone\n\n### Technical description\n\nThe `match_host` function in `src/bokeh/server/util.py` contains a flaw in how it compares hostnames against the allowlist patterns. The function uses Python's `zip()` function to iterate over the parts of the hostname and the pattern simultaneously. However, `zip()` stops iteration when the shortest iterable is exhausted.\n\nBecause the code only checks if the *pattern* is longer than the *host* (lines 232-233), but fails to check if the *host* is longer than the *pattern*, a host that **starts** with the pattern (but has additional segments) will successfully match.\n\nFor example, if the allowlist is configured to `['[example.com](http://example.com/)']`, the function will incorrectly validate `[example.com.bad.com](http://example.com.evil.com/)` as a match:\n1. `host` parts: `['example', 'com', 'bad', 'com']`\n2. `pattern` parts: `['example', 'com']`\n3. `zip` compares `example==example` (OK) and `com==com` (OK).\n4. Iteration stops, and the function returns `True`.","status":"published","published":"2026-01-06T17:53:44Z","modified":"2026-09-10T03:50:32.759807855Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium"}],"cwes":["CWE-1385"],"updated_at":"2026-11-02T15:46:40.657155Z"},{"id":"PYSEC-2026-1223","title":"Bokeh server applications have Incomplete Origin Validation in WebSockets","description":"This vulnerability allows for **Cross-Site WebSocket Hijacking (CSWSH)** of a deployed Bokeh server instance. \n\n### Scope\n\nThis vulnerability is only relevant to deployed Bokeh server instances. There is no impact on static HTML output, standalone embedded plots, or Jupyter notebook usage. \n\nThis vulnerability does not prevent any requirements for up-front authentication on Bokeh servers that have authentication hooks in place, and cannot be used to make Bokeh servers deployed on private, internal networks accessible outside those networks. \n\n### Impact\n\nIf a Bokeh server is configured with an allowlist (e.g., `dashboard.corp`), an attacker can register a domain like `dashboard.corp.attacker.com` (or use a subdomain if applicable) and lure a victim to visit it. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Since the Origin header (e.g., `http://dashboard.corp.attacker.com/`) matches the allowlist according to the flawed logic, the connection is accepted.\n\nOnce connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations.\n\n### Patches\nPatched in versions 3.8.2 and later.\n\n### Workarounds\n\nNone\n\n### Technical description\n\nThe `match_host` function in `src/bokeh/server/util.py` contains a flaw in how it compares hostnames against the allowlist patterns. The function uses Python's `zip()` function to iterate over the parts of the hostname and the pattern simultaneously. However, `zip()` stops iteration when the shortest iterable is exhausted.\n\nBecause the code only checks if the *pattern* is longer than the *host* (lines 232-233), but fails to check if the *host* is longer than the *pattern*, a host that **starts** with the pattern (but has additional segments) will successfully match.\n\nFor example, if the allowlist is configured to `['[example.com](http://example.com/)']`, the function will incorrectly validate `[example.com.bad.com](http://example.com.evil.com/)` as a match:\n1. `host` parts: `['example', 'com', 'bad', 'com']`\n2. `pattern` parts: `['example', 'com']`\n3. `zip` compares `example==example` (OK) and `com==com` (OK).\n4. Iteration stops, and the function returns `True`.","status":"published","published":"2026-07-07T16:03:16.722803Z","modified":"2026-07-07T17:47:32.65053714Z","cvss":[{"version":"4.0","score":4.5,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U","level":"medium"}],"updated_at":"2026-11-02T15:52:54.622769Z"}]}}
