Read the docs
TI-2022-06045 Aliases CVE-2022-21668GHSA-qc9x-gjcv-465w

Pipenv's requirements.txt parsing allows malicious index url in comments

Priority MEDIUM 44CWE-20Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-427.

Summary

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.

Why it matters now

EPSS 0.03931 90th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed pipenv (pypa): 2022.1.8pipenv (PyPI): 2022.1.8

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
pypapipenv2018.10.9 to before 2022.1.82022.1.8Patch availableCNA
—pipenv (PyPI)2018.10.9 to before 2022.1.82022.1.8Patch availableGHSA-qc9x-gjcv-465w
  • pipenv Vendorpypa Affected 2018.10.9 to before 2022.1.8 Fixed in 2022.1.8 Patch available CNA
  • pipenv (PyPI) Vendor— Affected 2018.10.9 to before 2022.1.8 Fixed in 2022.1.8 Patch available GHSA-qc9x-gjcv-465w

CPE configurations NVD · 4

CPEVersionsRoleVendor
cpe:2.3:a:pypa:pipenv:*:*:*:*:*:*:*:*2018.10.9 to before 2022.1.8Vulnerablepypa
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*34VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*35VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
  • cpe:2.3:a:pypa:pipenv:*:*:*:*:*:*:*:* Versions 2018.10.9 to before 2022.1.8 Vulnerable ·pypa
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject

Remediation

  • Fix · CNA pipenv (pypa) Fixed in 2022.1.8
  • Fix · GHSA-qc9x-gjcv-465w pipenv (PyPI) Fixed in 2022.1.8 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-21668
  2. 2026-10-03 Alias added: GHSA-qc9x-gjcv-465w
  3. 2026-10-30 EPSS moved to the 90th–95th percentile

References

Sources