9.3

CVE-2022-21668: Pipenv's requirements.txt parsing allows malicious index url in comments

Modified
AliasesGHSA-qc9x-gjcv-465wPYSEC-2022-6UBUNTU-CVE-2022-21668
Published 10-01-2022Last modified 03-08-2024

Vulnerability summary

CVE-2022-21668 is a high (CVSS 9.3) Improper Input Validation vulnerability in fedoraproject fedora. EPSS estimates a 3.93% chance of exploitation in the next 30 days, higher than 90.6% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (GitHub, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
9.3/10
010
High · v2.0 (NVD)
EPSS score
3.93%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Timeline

  1. 10-01-2022
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

6 scores · 4 sources · 3 versions

EPSS trend

Probability

3.93%

Chance of exploitation in the next 30 days

Percentile

91%

Versus all other CVEs

30-day change

No change 0.00 pp

From 3.93% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Pipenv

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Fedoraproject1 product
Pypa1 product
  • pipenv≥ 2018.10.9, < 2022.1.8
PyPI1 product
  • pipenv< 439782a8ae36c4762c88e43d5f0d8e563371b46f | ≥ 2018.10.9, < 2022.1.8
Ubuntu1 product
  • pipenvAll versions (No fix recorded)

4 vendors · 4 products

References

14 links
Show all 14 references