Skip to main content
Public proof of conceptFix available

CVE-2022-21668

A public proof of concept exists; no exploitation attested.

  • Published2022-01-10
  • WeaknessCWE-1284 · CWE-190 · CWE-20

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2022-01-1021:15CVE publishedNVD

Versions per branch

NVD · OSV
Fedoraproject fedora
BranchAffectedFixed in
34.x= 34no fix published
35.x= 35no fix published
36.x= 36no fix published
Pypa pipenv
BranchAffectedFixed in
2022.1≥ 2018.10.9, < 2022.1.82022.1.8

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • pipenvUbuntu:26.10all versions · no fixed version listed
  • pipenvUbuntu:26.04:LTSall versions · no fixed version listed
  • pipenvUbuntu:25.10all versions · no fixed version listed
  • pipenvUbuntu:24.04:LTSall versions · no fixed version listed
  • pipenvUbuntu:22.04:LTSall versions · no fixed version listed
  • pipenvUbuntu:20.04:LTSall versions · no fixed version listed
  • pipenvRoot:PyPIall versions · fixed in 2021.5.29+aikido.1
  • rootio-pipenvRoot:PyPIall versions · fixed in 2021.5.29+root.io.1

Vendor advisories

  • CVE-2022-21668 Red Hat Product Security

    pipenv: code execution via crafted requirements.txt file

Full record on NVD

Fix

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.18known since 2026-10-23
  • NVDCVSS 3.18.6read 2026-10-23
  • NVDCVSS 2.09.3read 2026-10-23
  • CNAweakness (CWE)CWE-20, CWE-427, CWE-77, CWE-78, CWE-791known since 2026-10-23
  • NVDweakness (CWE)CWE-1284, CWE-190read 2026-10-23
  • FIRST EPSSEPSS score3.9 %2026-12-03
  • PoC-in-GitHubproof of concept1known since 2026-11-01
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-01-10

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Published
2022-01-10
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-qc9x-gjcv-465w

Frequently asked questions

What is CVE-2022-21668?

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.

Is CVE-2022-21668 actively exploited?

Active exploitation of CVE-2022-21668 has not been confirmed. Its EPSS score was 3.9% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-21668?

CVE-2022-21668 has a CVSS v3 base score of 8.6 (High severity), with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.

Running pipenv? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record