Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessShip repo/archive with malicious notebook
-
DeliveryPlant coconut/__init__.py beside notebook
-
ExploitVictim opens notebook in Jupyter
-
ExecutionKernel auto-starts, sys.path[0] loads shadow package
-
ImpactArbitrary code executes as the user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path element control
|
| Exploitation Conditions | Exploitation requires that the victim has the Coconut Jupyter kernel installed (pip install coconut, which ships share/jupyter/kernels/coconut/kernel.json, or a kernel installed via |
| Impact | This is a genuine, actionable code-execution flaw rather than an inflated high-CVSS score, but its real-world urgency is moderated by a required user action and a limited install base. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, 8.5) and the GHSA-provided 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, 8.8) agree on the core picture: no privileges or authentication are needed (PR:N), complexity is low, and the technical impact is total (SSVC Technical Impact: total; full C/I/A compromise), but exploitation requires the victim to open an attacker-supplied notebook (UI:P / UI:R). The two vectors disagree on attack vector - the official 4.0 uses AV:L (consistent with opening a file from a cloned repo or extracted archive on the local system) while the GHSA 3.1 uses AV:N; AV:L is the more defensible reading because the trigger is a local notebook file, not a network service. SSVC rates Automatable: no, which fits - each victim must individually open a malicious notebook, so this favors targeted or opportunistic social-engineering delivery (malicious repos, course bundles, archives) over worm-like mass exploitation. There is no CISA KEV listing and no EPSS score in the provided data, so widespread active exploitation is not evidenced; the SSVC exploitation status is 'poc' and the GHSA advisory publishes a complete working proof-of-concept. The vendor-priority Decision label is this_week, which should drive patching cadence - meaningful but not emergency. Net: a real priority for anyone with the coconut Jupyter kernel installed, tempered by the required user interaction and the product's niche footprint. |
| Exploit ScenarioDerived | An attacker publishes a repository, course bundle, or archive containing a notebook whose metadata selects the 'coconut' kernel, plus a coconut/__init__.py file placed in the same directory. A developer who has the Coconut Jupyter kernel installed clones or extracts it and opens the notebook in JupyterLab, Notebook 7, or VS Code; because |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Code execution in the Coconut package (PyPI) through 3.3.0 occurs when a victim opens an attacker-supplied Jupyter notebook that selects the bundled 'coconut' kernelspec from a folder that also contains a planted coconut/__init__.py, causing the attacker's package to be imported instead of the installed one before any cell is run. Exploitation requires the coconut kernel to be installed on the victim's machine and the victim to open the notebook (user interaction, no privileges required per the CVSS vector PR:N), and the injected code runs with the opening user's privileges - on JupyterHub, as the hub user. A public proof-of-concept is documented in the vendor advisory and SSVC exploitation status is 'poc'; there is no CISA KEV entry, so active exploitation is not confirmed, and the vendor priority label is this_week with the fix landing in 3.3.1.
RemediationAI
Vendor-released patch: 3.3.1 (fixing commit https://github.com/evhub/coconut/commit/8a26f0db5c86f35abc8c9f452d02448d505c59ae, advisory https://github.com/evhub/coconut/security/advisories/GHSA-85q3-whq8-63qq). Upgrade with pip install --upgrade coconut>=3.3.1; because the vulnerable argv is persisted in the installed kernelspec, upgrading the package alone does not rewrite existing kernel definitions on disk - the fix ships code that updates outdated Coconut kernels in place during install_default_jupyter_kernels, so re-run coconut --jupyter (install) after the upgrade and confirm that share/jupyter/kernels/coconut/kernel.json (including any user-level copy, which takes precedence over the system one) no longer contains -m coconut.icoconut but the -c ... runpy.run_module(...) form. Until that is verified, treat the host as still vulnerable even after the pip upgrade. Compensating controls, all with trade-offs: do not open notebooks from cloned repositories, course bundles or extracted archives unless the project tree is reviewed for a stray coconut/ directory (this blocks the attack entirely but is a policy control that relies on user discipline); remove or disable the coconut kernelspec (delete the kernel directory or jupyter kernelspec remove coconut) so affected notebooks cannot select it - the side effect is that Coconut notebooks will not run until the kernel is reinstalled after patching; run Jupyter with a root directory that never contains untrusted project folders, or open untrusted notebooks with a kernel whose definition you control, at the cost of manual per-project setup. Note that after the fix the notebook directory is no longer on sys.path, so cells that relied on importing sibling modules must add the path explicitly inside the kernel.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-427 (untrusted search path), chained into CWE-94 code injection through Python's module-resolution behavior. Coconut ships a Jupyter kernelspec whose argv is python -m coconut.icoconut -f {connection_file}; pip install coconut installs it as wheel data at share/jupyter/kernels/coconut/kernel.json, and coconut --jupyter writes the same argv via make_custom_kernel in coconut/util.py. JupyterLab, Notebook 7 and VS Code start a kernel through POST /api/sessions when a notebook is merely opened, with the working directory set to the notebook's directory (jupyter_client LocalProvisioner), and python -m places the current directory at sys.path[0]. Because the argv lacks -P (Python 3.11+) and -I and resolves the module by name rather than by path, a <notebook dir>/coconut/__init__.py shadows the installed package and is executed while resolving coconut.icoconut - which also breaks Jupyter's trust model that opening an untrusted notebook executes nothing until a cell runs. The upstream fix replaces -m in the kernel.json files (py, py2, py3) and in the custom-kernel generator with -c "import sys; sys.path[:1] == [''] and sys.path.pop(0); import runpy; runpy.run_module('coconut.icoconut', run_name='__main__', alter_sys=True)", and applies the same python_module_argv helper to the LSP worker, pyright and mypy subprocesses, plus logic to rewrite already-installed kernelspecs in place.
Know when Coconut gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Trigger is a locally opened notebook file so AV:L; no privileges needed (PR:N) but the victim must open an untrusted notebook (UI:R); code runs as the user with full C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Coconut through 3.3.0 contains an untrusted search path vulnerability in its Jupyter kernelspec that allows attackers to execute code by placing a malicious coconut package beside a notebook. Because python -m coconut.icoconut puts the notebook's directory first on sys.path, a planted coconut/__init__.py runs as the user when the notebook opens and the kernel auto-starts.
Articles & Coverage 1
Technical POC Analysis
CWE-427 (Uncontrolled Search Path Element), with CWE-94 as the second tag.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The Coconut package (PyPI) through version 3.3.0 contains a code execution vulnerability that allows an attacker to run malicious code with the privileges of a user who opens a crafted Jupyter notebook. This affects data scientists, analysts, and any employee using JupyterHub, potentially leading to unauthorized access to sensitive data and systems. Leadership should prioritize remediation because a publicly available proof-of-concept exists and the vendor has released a fix.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
EUVD-2026-140309
GHSA-46vx-4v63-rm72
NVD
CVE.org
Vulnrichment
Exploit-DB