{"answers":{"affected":"3 open source packages ship an affected version, including ipython. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-24816 exists.","fix":"Upgrade ipython to 8.10.0 or later.","what":"CVE-2023-24816 is a medium-severity command injection vulnerability in ipython, published on 10 Feb 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-24816 and fix it if it is affected.\n\nWhat it is: CVE-2023-24816 is a medium-severity command injection vulnerability in ipython, published on 10 Feb 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-24816 exists.\n\nAffected packages and fixed versions:\n- ipython (PyPI): affected all versions; fixed in 8.10.0\n- ipython (PyPI): affected all versions; fixed in 8.10.0\n- ipython (PyPI): affected all versions; fixed in 8.10.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-24816/ (Markdown: https://insights.sbomify.com/CVE-2023-24816/index.md)","id":"CVE-2023-24816","markdown":"https://insights.sbomify.com/CVE-2023-24816/index.md","name":"CVE-2023-24816","record":{"aliases":["GHSA-29gw-9793-fvw7","PYSEC-2023-17","UBUNTU-CVE-2023-24816"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Python interactive shell","requires_auth":"none","summary":"Attackers can inject shell commands via untrusted input to set_term_title in IPython on Windows without ctypes, requiring library usage.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ipython","vendor":"ipython"}],"cvss":{"score":4.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"set_term_title command injection in ipython","id":"CVE-2023-24816","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"RIOT-OS vulnerable to Out of Bounds write in routing with SRH","id":"CVE-2023-24817"},"packages":[{"ecosystem":"PyPI","fixed":["8.10.0"],"introduced":["0"],"last_affected":[],"package":"ipython","purl":null,"source":"GHSA-29gw-9793-fvw7"},{"ecosystem":"PyPI","fixed":["8.10.0"],"introduced":["0"],"last_affected":[],"package":"ipython","purl":"pkg:pypi/ipython","source":"GHSA-29gw-9793-fvw7"},{"ecosystem":"PyPI","fixed":["8.10.0"],"introduced":["0"],"last_affected":[],"package":"ipython","purl":"pkg:pypi/ipython","source":"PYSEC-2023-17"}],"prev":{"headline":"Disclosure of classpath resources on Windows when mounted on a wildcard route in vertx-web","id":"CVE-2023-24815"},"products":["ipython"],"published":"2023-02-10","related":[{"cvss_score":6.1,"headline":"Improper Neutralization of Input During Web Page Generation in IPython","id":"CVE-2015-4706","kev_date_added":null,"published":"2017-09-21"},{"cvss_score":6.1,"headline":"Improper Neutralization of Input During Web Page Generation in IPython","id":"CVE-2015-4707","kev_date_added":null,"published":"2017-09-20"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["ipython"]},"summary":"Attackers can inject shell commands via untrusted input to set_term_title in IPython on Windows without ctypes, requiring library usage.","url":"https://insights.sbomify.com/CVE-2023-24816/"}