
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2022-21668 affects pipenv, a Python development workflow tool, from version 2018.10.9 to version 2021.11.23. The vulnerability was discovered in January 2022 and patched in version 2022.1.8. The flaw exists in pipenv's parsing of requirements files, which allows an attacker to insert specially crafted strings inside comments within a requirements.txt file (GitHub Advisory).
The vulnerability stems from a flaw in the parse_indexes() function of the pipenv.utils module, which incorrectly processes --index-url, --extra-index-url, and --trusted-host options. The function fails to ignore these options when they appear in comments and doesn't validate that these options appear on their own lines as required by the requirements file specification. The vulnerability has a CVSS v3.1 base score of 8.6 HIGH (AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H) according to NVD, while GitHub rates it at 8.0 HIGH (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H) (NVD, GitHub Advisory).
If successfully exploited, an attacker can cause victims using pipenv to download dependencies from a malicious package index server controlled by the attacker. When pip installs from a source distribution, any code in the setup.py is executed by the install process, enabling arbitrary remote code execution (RCE) on the victim's system. Attackers could potentially steal credentials, mine cryptocurrency, install malware, or gain persistent access to the victim's system (GitHub Advisory).
The vulnerability has been patched in pipenv version 2022.1.8. Users should upgrade to this version or later to mitigate the risk. The fix includes changes to properly handle requirements file parsing and validation of index options (GitHub Release, GitHub Patch).
The vulnerability was addressed promptly by the pipenv maintainers and received attention from various Linux distributions. Fedora released security updates for versions 34, 35, and 36 to address the vulnerability (Fedora 34, Fedora 35, Fedora 36).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."