Cross-Site Scripting (XSS) Vulnerability in IPython: Risk of Remote Code Injection

ipython Updated 02 Oct 2025

Summary

20/09/2017
N/A
Yes i
Medium
6.1

CVE-2015-4707: Cross-site scripting (XSS) vulnerability in IPython before 3.2 allows remote attackers to inject arbitrary web script or HTML via vectors involving JSON error messages and the /api/notebooks path. Affects ipython versions < 2.4.1-1. Fixed in 2.4.1-1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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

IPython is an interactive computing environment that allows users to write and execute code in various programming languages, primarily Python. It provides a rich toolkit for interactive computing, including a powerful shell, a web-based notebook interface, and support for data visualization. However, prior to version 3.2, IPython was susceptible to a cross-site scripting (XSS) vulnerability that could allow attackers to inject arbitrary web scripts or HTML through JSON error messages in the /api/notebooks path.

Vulnerability Detail

The vulnerability, identified as CVE-2015-4707, arises from improper handling of JSON error messages in IPython versions before 3.2. This flaw allows remote attackers to exploit the application by injecting malicious scripts into the web interface. If successfully executed, this could lead to unauthorized actions being performed on behalf of the user, data theft, or other malicious activities. The vulnerability has a CVSS score of 6.1, indicating a medium severity level.

How To Fix

Minimum fixed version

2.4.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ipython

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

Workaround

If upgrading is not immediately possible, consider restricting access to the IPython web interface to trusted users only. This can be done by configuring firewall rules or using authentication mechanisms to limit exposure to potential attackers.

Conclusion

The CVE-2015-4707 vulnerability in IPython poses a significant risk due to its potential for remote code injection via XSS. Users are strongly advised to upgrade to the latest version to mitigate this risk. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities in your software projects effectively.

See every vulnerability recorded for ipython →

Share this vulnerability

FAQ

CVE-2015-4707 is a cross-site scripting (XSS) vulnerability found in IPython versions before 3.2, allowing remote attackers to inject malicious scripts.

You can check your IPython version by running 'ipython --version' in your terminal. If it is below 2.4.1-1, it is vulnerable.

The vulnerability could allow attackers to execute arbitrary scripts in the context of the user's session, leading to data theft or unauthorized actions.

Yes, you can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json.

Detailed information can be found in the official CVE database or through security advisories related to IPython.

Related vulnerabilities

Recent vulnerabilities recorded for ipython.

How To Fix

Minimum fixed version

2.4.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ipython

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