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.
Vulnerable Library - pipenv-2021.5.29-py2.py3-none-any.whl
Python Development Workflow for Humans.
Library home page: https://files.pythonhosted.org/packages/c1/a3/d266421362565864f130cb97f55f70c763b843c9a67311d215d75b7ec464/pipenv-2021.5.29-py2.py3-none-any.whl
Path to dependency file: /python/helpers/requirements.txt
Path to vulnerable library: /python/helpers/requirements.txt
Vulnerabilities
**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation
Details
CVE-2022-21668
### Vulnerable Library - pipenv-2021.5.29-py2.py3-none-any.whlPython Development Workflow for Humans.
Library home page: https://files.pythonhosted.org/packages/c1/a3/d266421362565864f130cb97f55f70c763b843c9a67311d215d75b7ec464/pipenv-2021.5.29-py2.py3-none-any.whl
Path to dependency file: /python/helpers/requirements.txt
Path to vulnerable library: /python/helpers/requirements.txt
Dependency Hierarchy: - :x: **pipenv-2021.5.29-py2.py3-none-any.whl** (Vulnerable Library)
Found in base branch: main
### Vulnerability Detailspipenv 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.
Publish Date: 2022-01-10
URL: CVE-2022-21668
### CVSS 3 Score Details (8.0)Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: High - Privileges Required: Low - User Interaction: Required - Scope: Changed - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High
For more information on CVSS3 Scores, click here. ### Suggested FixType: Upgrade version
Origin: https://github.com/pypa/pipenv/security/advisories/GHSA-qc9x-gjcv-465w
Release Date: 2022-01-10
Fix Resolution: 2022.1.8
:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.:rescue_worker_helmet:Automatic Remediation will be attempted for this issue.