CVEvulnerability

CVE-2022-21668

8.6 HIGH Published 2022-01-10 Modified 2026-06-17 Official page ↗
Status
Modified
Published
2022-01-10
Last modified
2026-06-17
Assigner
[email protected]
CVSS 3.1 ([email protected])
8.0 HIGH — CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
CVSS 3.1 ([email protected])
8.6 HIGH — CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CVSS 2.0 ([email protected])
9.3 HIGH — AV:N/AC:M/Au:N/C:C/I:C/A:C
Weaknesses
CWE-1284, CWE-190, CWE-20, CWE-427, CWE-77, CWE-78, CWE-791

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.

Affected configurations

• pypa pipenv (>= 2018.10.9 < 2022.1.8) • fedoraproject fedora 34 • fedoraproject fedora 35 • fedoraproject fedora 36

Related

Weakness · CWE (7)

  • CWE-1284 Improper Validation of Specified Quantity in Input weakness
  • CWE-190 Integer Overflow or Wraparound weakness
  • CWE-20 Improper Input Validation weakness
  • CWE-427 Uncontrolled Search Path Element weakness
  • CWE-77 Improper Neutralization of Special Elements used in a Command weakness
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness
  • CWE-791 Incomplete Filtering of Special Elements weakness

References