CVE-2023-24816: IPython Command Injection Vulnerability

ipython Updated 23 Feb 2026

Summary

10/02/2023
Yes i
Low
4.5

CVE-2023-24816: 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.

< 8.10.0 < 385d69325319a5972ee9b5983638e3617f21cb1f

Fixed in 385d69325319a5972ee9b5983638e3617f21cb1f. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

IPython is an interactive computing environment that supports multiple programming languages, primarily Python. It provides a rich toolkit for interactive computing, including features like dynamic introspection, rich media, and shell access. However, certain versions of IPython prior to 8.1.0 are vulnerable to a command injection issue that can be exploited under specific conditions.

Vulnerability Detail

The vulnerability arises from the function IPython.utils.terminal.set_term_title, which can be exploited when called in a Windows environment where the ctypes library is unavailable. This situation allows an attacker to inject shell commands into the current process, limited to its scope. The risk is particularly relevant for users who utilize IPython as a library, as it can be invoked with untrusted input, leading to potential command execution vulnerabilities.

How To Fix

Minimum fixed version

385d69325319a5972ee9b5983638e3617f21cb1f

This is the first release that contains the fix.

pip install --upgrade "ipython==385d69325319a5972ee9b5983638e3617f21cb1f"

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

Workaround

If upgrading is not immediately possible, users should ensure that any calls to the IPython.utils.terminal.set_term_title function are made with trusted or filtered input to mitigate the risk of command injection.

Conclusion

The command injection vulnerability in IPython (CVE-2023-24816) poses a significant risk for users, particularly those utilizing IPython as a library. It is crucial to upgrade to the patched version or implement workarounds to mitigate potential exploitation.

See every vulnerability recorded for ipython →

Share this vulnerability

FAQ

Versions of IPython prior to 8.1.0 are affected by this command injection vulnerability.

The vulnerability allows an attacker to inject shell commands into the current process when untrusted input is passed to the set_term_title function.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If an upgrade is not feasible, ensure that any input to the set_term_title function is trusted or filtered to prevent command injection.

Yes, Vulert can monitor and alert in real-time for open-source vulnerabilities in your software using just the Pipfile.lock.

Related vulnerabilities

Recent vulnerabilities recorded for ipython.

How To Fix

Minimum fixed version

385d69325319a5972ee9b5983638e3617f21cb1f

This is the first release that contains the fix.

pip install --upgrade "ipython==385d69325319a5972ee9b5983638e3617f21cb1f"

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