Remote Code Execution (RCE) Affecting ipython package, versions [,8.10.0)


0.0
medium

Snyk CVSS

    Attack Complexity High
    User Interaction Required

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.07% (29th percentile)
Expand this section
NVD
7 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-IPYTHON-3318382
  • published 11 Feb 2023
  • disclosed 11 Feb 2023
  • credit Unknown

How to fix?

Upgrade ipython to version 8.10.0 or higher.

Overview

Affected versions of this package are vulnerable to Remote Code Execution (RCE) 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.