Live threats

All CVEs / Pypa

CVE-2022-21668Pypa Pipenv

High 8.6

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
Weakness (CWE)
CWE-20, CWE-77, CWE-78, CWE-427, CWE-791, CWE-190, CWE-1284
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pipenv.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
pypapipenv≥ 2018.10.9 < 2022.1.8
fedoraprojectfedora34
fedoraprojectfedora35
fedoraprojectfedora36

Official sources

References

Links published by the sources. Open them with care.