CVE-2018-19352: XSS Vulnerability in Jupyter Notebook

notebook Updated 02 Oct 2025

Summary

21/11/2018
Yes i
Moderate
6.1

CVE-2018-19352: Jupyter Notebook XSS via directory name. Affects notebook versions < 5.7.2. Fixed in 5.7.2. How to fix ↓

Also tracked for

The same CVE-2018-19352 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Jupyter Notebook is an open-source web application that allows users to create and share documents containing live code, equations, visualizations, and narrative text. It is widely used for data analysis, scientific research, and machine learning. Jupyter Notebook provides an interactive computing environment that supports various programming languages, including Python, R, and Julia. Unfortunately, Jupyter Notebook versions prior to 5.7.2 are susceptible to a moderate severity XSS vulnerability.

Vulnerability Detail

The XSS vulnerability in Jupyter Notebook (CVE-2018-19352) arises from the unsafe handling of certain URLs in the notebook/static/tree/js/notebooklist.js file. An attacker can exploit this vulnerability by crafting a malicious directory name. When a user accesses the affected directory, the malicious code is executed in the user's browser, potentially leading to unauthorized access, data theft, or other malicious activities. The vulnerability has a CVSS score of 6.1, indicating a moderate severity level.

How To Fix

Latest published version: 7.6.3 as of 22 Oct 2026

pip install --upgrade "notebook==7.6.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.7.2

This is the first release that contains the fix.

pip install --upgrade "notebook==5.7.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, users can manually modify the affected file (notebook/static/tree/js/notebooklist.js) to implement proper URL handling and prevent XSS attacks. Here is an example of the modified code:

// Safe URL handling
function handleURL(url) {
  var sanitizedURL = sanitizeURL(url);
  // Handle the sanitized URL
}

// URL sanitization
function sanitizeURL(url) {
  // Implement URL sanitization logic here
  // Return the sanitized URL
}

Conclusion

In conclusion, the XSS vulnerability (CVE-2018-19352) in Jupyter Notebook poses a moderate security risk. It is crucial to upgrade to Jupyter Notebook version 5.7.2 or later to mitigate this vulnerability. Users can also implement a workaround by modifying the affected file, but upgrading to the latest version is strongly recommended. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for notebook →

Share this vulnerability

FAQ

Jupyter Notebook is an open-source web application that allows users to create and share documents containing live code, equations, visualizations, and narrative text. It is widely used for data analysis, scientific research, and machine learning.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to unauthorized access, data theft, or other malicious activities.

The XSS vulnerability in Jupyter Notebook can allow an attacker to execute arbitrary code in the user's browser, potentially leading to unauthorized access, data theft, or other malicious activities.

To fix this vulnerability, it is recommended to upgrade Jupyter Notebook to version 5.7.2 or later. This can be done by updating the package using the package manager or by following the installation instructions provided by the Jupyter Notebook project.

Yes, as a workaround, users can manually modify the affected file (notebook/static/tree/js/notebooklist.js) to implement proper URL handling and prevent XSS attacks. However, it is strongly recommended to upgrade to the latest version of Jupyter Notebook to ensure comprehensive security.

Related vulnerabilities

Recent vulnerabilities recorded for notebook.

How To Fix

Latest published version: 7.6.3 as of 22 Oct 2026

pip install --upgrade "notebook==7.6.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.7.2

This is the first release that contains the fix.

pip install --upgrade "notebook==5.7.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback