{"id":"CVE-2023-24816","published":"2023-02-10T19:52:56Z","modified":"2025-03-10T21:13:52Z","title":"set_term_title command injection in ipython","vendor":"ipython","product":"ipython","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01319,"percentile":0.71567,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/ipython/ipython/security/advisories/GHSA-29gw-9793-fvw7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ipython/ipython/commit/385d69325319a5972ee9b5983638e3617f21cb1f","tags":["x_refsource_MISC"]},{"url":"https://github.com/ipython/ipython/blob/3f0bf05f072a91b2a3042d23ce250e5e906183fd/IPython/utils/terminal.py#L103-L117","tags":["x_refsource_MISC"]},{"url":"https://github.com/ipython/ipython/blob/56e6925dfa50e2c7f4a6471547b8176275db7c25/IPython/utils/_process_win32.py#L20","tags":["x_refsource_MISC"]}],"priority":{"score":17.5,"factors":[{"name":"EPSS percentile","points":14.31},{"name":"CVSS severity","points":3.15}]},"vendorSlug":"ipython","affectedVersions":[{"vendor":"ipython","product":"ipython","versions":["< 8.10"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T21:00:58.089806Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"ipython","vulnerableRanges":["<8.10.0"],"patched":["8.10.0"],"from":["GHSA-29gw-9793-fvw7","PYSEC-2023-17"],"provenance":"source"}],"summary":{"text":"The set_term_title function in IPython versions prior to 8.1.0, specifically IPython.utils.terminal.set_term_title, contains a command injection flaw that affects the library when used by other tools; the ipython binary itself cannot reach the vulnerable code because of a ctypes dependency. An attacker who can supply untrusted input to this function on Windows, in a Python environment where ctypes is unavailable, could inject shell commands that run with the privileges of the current process, and exploitation requires local access, a high-complexity condition, and user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:06:43Z"},"euvd":{"id":"EUVD-2023-0099","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ipython-cve-2022-21699","parents":[{"from":"CVE-2022-21699","to":"CVE-2023-24816","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:ipython","fromFixed":"8.0.1","toFixed":"8.10.0","daysApart":387},{"kind":"same-code","provenance":"machine","files":["IPython/__init__.py"],"commits":["https://github.com/ipython/ipython/commit/46a51ed69cdf41b4333943d9ceeb945c4ede5668","https://github.com/ipython/ipython/commit/5fa1e409d2dc126c456510c16ece18e08b524e5b","https://github.com/ipython/ipython/commit/385d69325319a5972ee9b5983638e3617f21cb1f","https://github.com/ipython/ipython/commit/991849c247fc208628879e7ca2923b3c218a5a75"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2015-7337","published":"2015-09-29","fixed":"3.2.2","kev":false},{"cve":"CVE-2015-5607","published":"2017-09-20","fixed":"3.2.3","kev":false},{"cve":"CVE-2022-21699","published":"2022-01-19","fixed":"8.0.1","kev":false},{"cve":"CVE-2023-24816","published":"2023-02-10","fixed":"8.10.0","kev":false}],"package":"PyPI:ipython"}}