CVE Intelligence
Skip to main content
HIGHpublic exploit

CVE-2022-21668

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

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…

Published Updated Sources: cvelistV5, GitHub_M

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.

Exploitation

Exploit code

public exploit, none observed

EPSS

4%

chance of exploitation in 30 days

Affects

pypa

pipenv

CVSS base

8

HIGH

Affected scope

The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.

Vendors (1)

Products (1)

pipenv

Every base score collected

Sources score independently and disagree; each row says who scored it and under which version.

ScoreVersionSeverityExpl.ImpactSource
8CVSS 3.1HIGH——cvelistV5

Weakness & attack patterns

  • CWE-20
  • CWE-77
  • CWE-78
  • CWE-427
  • CWE-791

Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.

  • T1562.003Impair Defenses: Impair Command History Logging
  • T1574.006Hijack Execution Flow: Dynamic Linker Hijacking
  • T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable

Public exploit

Capability, not use: code existing is a different claim from anyone running it.

Indexed by

poc in github

References

6 on the record

Elsewhere on this site

  • pypaevery CVE for this vendor
  • CWE-20other pages naming this weakness

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.