GHSA-793v-589g-574v

Suggest an improvement
Source
https://github.com/advisories/GHSA-793v-589g-574v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-793v-589g-574v/GHSA-793v-589g-574v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-793v-589g-574v
Aliases
Published
2026-01-06T17:53:44Z
Modified
2026-01-08T20:29:37.667769Z
Severity
  • 4.5 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Bokeh server applications have Incomplete Origin Validation in WebSockets
Details

This vulnerability allows for Cross-Site WebSocket Hijacking (CSWSH) of a deployed Bokeh server instance.

Scope

This vulnerability is only relevant to deployed Bokeh server instances. There is no impact on static HTML output, standalone embedded plots, or Jupyter notebook usage.

This 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.

Impact

If 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.

Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations.

Patches

Patched in versions 3.8.2 and later.

Workarounds

None

Technical description

The 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.

Because 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.

For 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: 1. host parts: ['example', 'com', 'bad', 'com'] 2. pattern parts: ['example', 'com'] 3. zip compares example==example (OK) and com==com (OK). 4. Iteration stops, and the function returns True.

Database specific
{
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-1385"
    ],
    "severity": "MODERATE",
    "github_reviewed_at": "2026-01-06T17:53:44Z",
    "nvd_published_at": "2026-01-08T02:15:53Z"
}
References

Affected packages

PyPI / bokeh

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.8.2

Affected versions

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
0.10.0
0.11.0
0.11.1
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.12.9
0.12.10
0.12.11
0.12.13
0.12.14
0.12.15
0.12.16
0.13.0

1.*

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.*

2.0.0rc1
2.0.0rc2
2.0.0
2.0.1
2.0.2
2.1.0rc1
2.1.0rc2
2.1.0rc3
2.1.0
2.1.1
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.0
2.2.1
2.2.2
2.2.3
2.3.0.dev1
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.0.dev10
2.3.0.dev11
2.3.0.dev12
2.3.0.dev13
2.3.0.dev14
2.3.0rc2
2.3.0rc3
2.3.0rc4
2.3.0
2.3.1.dev1
2.3.1rc1
2.3.1rc2
2.3.1
2.3.2rc1
2.3.2
2.3.3rc1
2.3.3
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.d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
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.0
3.7.1
3.7.2
3.7.3rc1
3.7.3rc2
3.7.3
3.8.0.dev1
3.8.0.dev2
3.8.0.dev3
3.8.0.dev4
3.8.0rc1
3.8.0rc2
3.8.0
3.8.1

Database specific

source

"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-793v-589g-574v/GHSA-793v-589g-574v.json"