CVE-2023-24816
set_term_title command injection in ipython
Also known as GHSA-29gw-9793-fvw7, PYSEC-2023-17
Mitigation
- Upgrade ipython to 8.10.0 or later.
Who should check
- Projects that depend on PyPI package ipython (< 8.10.0)
- Anyone running ipython < 8.10
Vulnerability facts
- Affected
- ipython < 8.10.0
- Fixed in
- 8.10.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 4.5 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 1.77% chance of exploitation in 30 days (percentile 79, 2026-11-26)
- CWE
- CWE-20, CWE-78
- Modified
Description
IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Versions prior to 8.1.0 are subject to a command injection vulnerability with very specific prerequisites. This vulnerability requires that the function `IPython.utils.terminal.set_term_title` be called on Windows in a Python environment where ctypes is not available. The dependency on `ctypes` in `IPython.utils._process_win32` prevents the vulnerable code from ever being reached in the ipython binary. However, as a library that could be used by another tool `set_term_title` could be called and hence introduce a vulnerability. Should an attacker get untrusted input to an instance of this function they would be able to inject shell commands as current process and limited to the scope of the current process. Users of ipython as a library are advised to upgrade. Users unable to upgrade should ensure that any calls to the `IPython.utils.terminal.set_term_title` function are done with trusted or filtered input.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-24816. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-24816.md Affected: ipython < 8.10.0 Fixed in: 8.10.0 Steps: 1. Search this machine and project for ipython (PyPI), ipython: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Other
- https://github.com/ipython/ipython/blob/3f0bf05f072a91b2a3042d23ce250e5e906183fd/IPython/utils/terminal.py#L103-L117
- https://github.com/ipython/ipython/blob/56e6925dfa50e2c7f4a6471547b8176275db7c25/IPython/utils/_process_win32.py#L20
- https://github.com/Carreau/ipython/blob/7557ade0ed927475d5ab5b573d0ea4febfb22683/docs/source/whatsnew/version8.rst#ipython-810
- https://github.com/ipython/ipython
- https://github.com/pypa/advisory-database/tree/main/vulns/ipython/PYSEC-2023-17.yaml
FAQ
Is CVE-2023-24816 being exploited?
There is no confirmed exploitation: CVE-2023-24816 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.77% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-24816?
Medium: CVSS 4.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-24816?
ipython < 8.10.0.
Is there a fix for CVE-2023-24816?
Yes. Fixed in 8.10.0. Upgrade ipython to 8.10.0 or later.
How do I check if I'm affected by CVE-2023-24816?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.