Arbitrary Code Execution Vulnerability in IPython: A Cross-User Threat

ipython Updated 02 Oct 2025

Summary

19/01/2022
N/A
Yes i
High
8.8

CVE-2022-21699: IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affects ipython across 2 version ranges.

< 7.20.0-1+deb11u1 < 46a51ed69cdf41b4333943d9ceeb945c4ede5668

Fixed in 7.20.0-1+deb11u1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

IPython is an interactive command shell for computing in various programming languages, primarily Python. It offers a rich toolkit to help users with data analysis, visualization, and interactive computing. However, certain versions of IPython are vulnerable to an arbitrary code execution issue due to improper management of cross-user temporary files, which can lead to serious security risks.

Vulnerability Detail

The vulnerability arises from the way IPython handles temporary files created by users. When these files are not properly isolated, a malicious user can exploit this flaw to execute arbitrary code in the context of another user on the same machine. This can lead to unauthorized access to sensitive data, system compromise, and other malicious activities. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

7.20.0-1+deb11u1

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 user access to the IPython environment or using alternative secure environments for sensitive tasks. Additionally, ensure that proper file permissions are set to limit access to temporary files.

Conclusion

The arbitrary code execution vulnerability in IPython poses a significant risk to users, allowing malicious actors to execute code in the context of other users. It is crucial to upgrade to the latest secure versions to mitigate this risk. Users should also consider using tools like Vulert to monitor for vulnerabilities in their applications.

See every vulnerability recorded for ipython →

Share this vulnerability

FAQ

The vulnerability allows one user to execute arbitrary code as another user due to improper management of temporary files.

Affected versions include those prior to 7.20.0-1+deb11u1 for Debian 11 and prior to 7.31.1-1 for Debian 12 and 13.

Exploitation of this vulnerability can lead to unauthorized access to sensitive data, system compromise, and execution of malicious code.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for ipython.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

7.20.0-1+deb11u1

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