Any ML/data science team running Jupyter Notebook below 5.4.1 is exposed to code execution if a team member opens a crafted notebook file — a realistic scenario given how freely .ipynb files are shared via GitHub, Slack, and email. Patch immediately to 5.4.1+; audit your notebook-sharing workflows for untrusted sources. The 2018 vintage and low EPSS (0.0012) suggest no active exploitation campaigns, but the attack surface in AI/ML environments is high.
What is the risk?
Risk is moderate-to-high for organizations still running legacy Jupyter instances, which is not uncommon in air-gapped or on-premise ML environments where upgrades lag. The local attack vector (AV:L) requires user interaction — opening a malicious notebook — but AI/ML teams routinely share notebooks from external sources (Kaggle, GitHub, colleagues), making social engineering highly plausible. CVSS 7.8 reflects full C/I/A impact once exploited. Low EPSS indicates no current mass exploitation, but targeted attacks against ML teams are credible.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter Notebook | pip | < 5.4.1 | 5.4.1 |
Do you use Jupyter Notebook? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade Jupyter Notebook to >= 5.4.1 immediately — pip install --upgrade notebook.
-
Audit all running Jupyter instances across ML infrastructure; prioritize JupyterHub deployments.
-
Enforce a policy: only open .ipynb files from trusted, version-controlled repositories.
-
For detection: scan .ipynb files (JSON format) for embedded HTML tags containing event handlers (onerror, onload, onmouseover) or script-adjacent patterns before sharing.
-
Consider nbstripout or similar tools in CI/CD to sanitize notebooks before merge.
-
Run Jupyter with minimum required OS privileges and network isolation.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2018-8768?
Any ML/data science team running Jupyter Notebook below 5.4.1 is exposed to code execution if a team member opens a crafted notebook file — a realistic scenario given how freely .ipynb files are shared via GitHub, Slack, and email. Patch immediately to 5.4.1+; audit your notebook-sharing workflows for untrusted sources. The 2018 vintage and low EPSS (0.0012) suggest no active exploitation campaigns, but the attack surface in AI/ML environments is high.
Is CVE-2018-8768 actively exploited?
No confirmed active exploitation of CVE-2018-8768 has been reported, but organizations should still patch proactively.
How to fix CVE-2018-8768?
1. Upgrade Jupyter Notebook to >= 5.4.1 immediately — pip install --upgrade notebook. 2. Audit all running Jupyter instances across ML infrastructure; prioritize JupyterHub deployments. 3. Enforce a policy: only open .ipynb files from trusted, version-controlled repositories. 4. For detection: scan .ipynb files (JSON format) for embedded HTML tags containing event handlers (onerror, onload, onmouseover) or script-adjacent patterns before sharing. 5. Consider nbstripout or similar tools in CI/CD to sanitize notebooks before merge. 6. Run Jupyter with minimum required OS privileges and network isolation.
What systems are affected by CVE-2018-8768?
This vulnerability affects the following AI/ML architecture patterns: Data science workstations, ML training pipelines, Collaborative notebook environments, JupyterHub multi-user deployments, MLOps experimentation platforms.
What is the CVSS score for CVE-2018-8768?
CVE-2018-8768 has a CVSS v3.1 base score of 7.8 (HIGH). The EPSS exploitation probability is 1.10%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011 User Execution AML.T0011.000 Unsafe AI Artifacts AML.T0025 Exfiltration via Cyber Means AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
In Jupyter Notebook before 5.4.1, a maliciously forged notebook file can bypass sanitization to execute JavaScript in the notebook context. Specifically, invalid HTML is 'fixed' by jQuery after sanitization, making it dangerous.
Exploitation Scenario
An adversary targeting an ML engineering team crafts a malicious notebook file containing invalid HTML with an embedded payload — e.g., an img tag with a malformed src attribute that jQuery 'repairs' post-sanitization into a valid XSS vector. The file is uploaded to a public GitHub repo mimicking a legitimate ML tutorial, or sent via Slack as 'a useful training script'. A data scientist opens it in their unpatched Jupyter instance. The JavaScript executes, harvests the Jupyter session cookie, and POSTs it to an attacker-controlled server. The attacker now has full access to the Jupyter server, its filesystem, training data, API keys in environment variables, and any connected databases.
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-52798 8.9 Gogs: Stored XSS via .ipynb Markdown re-render bypass
Same package: notebook CVE-2026-42266 8.8 JupyterLab: Extension allow-list bypass enables privesc
Same package: notebook CVE-2026-5422 8.1 jupyter-server: path traversal exposes sibling dir files
Same package: notebook CVE-2026-54293 7.5 NLTK: path traversal leaks arbitrary local files
Same package: notebook CVE-2026-35397 7.1 Jupyter Server: path traversal leaks sibling directories
Same package: notebook