# CVE-2023-24816: IPython command injection in set_term_title

Source: https://junglewise.ai/threats/cve-2023-24816-ipython-command-injection-in-set-term-title  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-02-10. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2023-24816 · Severity: low · CVSS 3.1 · Published 2023-02-10

IPython is an interactive Python shell used by data scientists and developers. A command injection vulnerability in its terminal title-setting function allows an attacker to execute arbitrary commands if a user changes into a specially-named directory on Windows systems with a specific Python build lacking ctypes support. This could lead to unauthorized code execution and system compromise.

Technologies: [ipython (PyPI)](https://junglewise.ai/threats/technologies/ipython). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2023-24816 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-24816 being exploited in the wild.

**How severe is CVE-2023-24816?** Low severity, with a CVSS score of 3.1, published 10 February 2023.

**Which products and versions are affected?** ipython (PyPI) ECOSYSTEM:introduced=0,fixed=8.10.0, GIT:introduced=0,fixed=385d69325319a5972ee9b5983638e3617f21cb1f|ECOSYSTEM:introduced=0,fixed=8.10.0.

**Is there a fix for CVE-2023-24816?** Yes. ipython (PyPI): upgrade to 8.10.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-24816 attacked?** It is attacked with local access.

**Am I affected by CVE-2023-24816?** Check whether you run ipython (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- ipython (PyPI): upgrade to 8.10.0 or later

  ```sh
  pip install "ipython>=8.10.0"
  ```


## Technical details

The vulnerability is a command injection (CWE-78, CWE-20) in the set_term_title function in IPython.utils.terminal.py, which unsafely passes unsanitized input directly to os.system() on Windows. Attack requires: Windows OS, Python built without ctypes, set_term_title enabled, and user interaction (cd into attacker-controlled directory with shell metacharacters in its name). An attacker can inject arbitrary shell commands via directory names; for example, a directory named "&& echo pwn > pwn.txt" would create a file when the user cds into it. The function is effectively dead code in normal IPython usage because IPython depends on ctypes elsewhere, but could pose risk if used as a library. Fixed in IPython 8.10.0 and later.

## Affected products

- IPython IPython <8.10.0

## Identifiers

- CVE-2023-24816
- GHSA-29gw-9793-fvw7
- PYSEC-2023-17

## Timeline

- 2023-02-10: disclosed
- 2023-02-10: patched: IPython 8.10.0 and later

## References

- [https://github.com/ipython/ipython/security/advisories/GHSA-29gw-9793-fvw7](https://github.com/ipython/ipython/security/advisories/GHSA-29gw-9793-fvw7)

## Related threats

- [Execution with Unnecessary Privileges in ipython](https://junglewise.ai/threats/cve-2022-21699-execution-with-unnecessary-privileges-in-ipython)
- [Improper Neutralization of Input During Web Page Generation in IPython](https://junglewise.ai/threats/cve-2015-4706-improper-neutralization-of-input-during-web-page-generation-in)
- [Improper Neutralization of Input During Web Page Generation in IPython](https://junglewise.ai/threats/cve-2015-4707-improper-neutralization-of-input-during-web-page-generation-in)
- [PYSEC-2017-47 - Cross-site request forgery in the REST API in IPython 2 and 3.](https://junglewise.ai/threats/cve-2015-5607-ipython-vulnerable-to-cross-site-request-forgery-csrf)
- [Improper Input Validation in Jupyter Notebook](https://junglewise.ai/threats/cve-2015-7337-improper-input-validation-in-jupyter-notebook)
