RCE in Pypa Pipenv

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.

Vulnerability class: Drupalgeddon 2 (CVE-2018-7600)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 8.0 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.039 (89.9th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 90th percentile — 89.9% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2022-21668: held from 0.039 to 0.039.

EPSS over last 30 days · oldest: 0.039 · newest: 0.039 · change: 0.000

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2022-21668?
CVE-2022-21668 is a high-severity vulnerability in Pypa Pipenv, classified under Improper Input Validation. CVSS score: 8.0/10. Published 2022-01-10.
How severe is CVE-2022-21668?
High severity. CVSS v3 base score is 8.0 out of 10.
Is CVE-2022-21668 known to be exploited?
15 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.