CVE-2022-21668Pypa Pipenv
High 8.6
Follow: this CVE · Pypa · Pypa Pipenv We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 8.6
- EPSS
- 3.9% probability of exploitation in 30 days · percentile 91
- Auth required
- Yes
- Published
- Jan 10, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
What happens
pipenv is a Python development workflow tool. Starting with version 2018.10.9 and prior to version 2022.1.8, a flaw in pipenv's parsing of requirements files allows an attacker to insert a specially crafted string inside a comment anywhere within a requirements.txt file, which will cause victims who use pipenv to install the requirements file to download dependencies from a package index server controlled by the attacker. By embedding malicious code in packages served from their malicious index server, the attacker can trigger arbitrary remote code execution (RCE) on the victims' systems. If an attacker is able to hide a malicious `--index-url` option in a requirements file that a victim installs with pipenv, the attacker can embed arbitrary malicious code in packages served from their malicious index server that will be executed on the victim's host during installation (remote code execution/RCE). When pip installs from a source distribution, any code in the setup.py is executed by the install process. This issue is patched in version 2022.1.8. The GitHub Security Advisory contains more information about this vulnerability.
What to do
- Apply the vendor's security update for Pipenv.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | pipenv |
≥ 2018.10.9 < 2022.1.8 |
2022.1.8 |
pip install "pipenv>=2022.1.8" |
| PyPI | pipenv |
≥ 2018.10.9 < 2022.1.8 |
2022.1.8 |
pip install "pipenv>=2022.1.8" |
Per OSV / GitHub Advisories (GHSA-qc9x-gjcv-465w, PYSEC-2022-6). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| pypa | pipenv | ≥ 2018.10.9 < 2022.1.8 |
| fedoraproject | fedora | 34 |
| fedoraproject | fedora | 35 |
| fedoraproject | fedora | 36 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Exploit Third Party Advisory
- lists.fedoraproject.org Mailing List
- lists.fedoraproject.org Mailing List
- lists.fedoraproject.org Mailing List