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.
Severity
CVSS 3.1
8.6 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS
3.9%(unchanged from 3.9% a week ago; 3.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 91st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-190Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse) CWE-1284Improper Validation of Specified Quantity in Input CWE-20Improper Input Validation CWE-77Improper Neutralization of Special Elements used in a Command CWE-78Improper Neutralization of Special Elements used in an OS Command (OS Command Injection) CWE-427Uncontrolled Search Path Element CWE-791Incomplete Filtering of Special Elements
Show the promptExplain CVE-2022-21668 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-21668?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-21668?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-21668 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.
Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.