Bug 2039830 (CVE-2022-21668) - CVE-2022-21668 pipenv: code execution via crafted requirements.txt file
Summary: CVE-2022-21668 pipenv: code execution via crafted requirements.txt file
Keywords:
Status: CLOSED UPSTREAM
Alias: CVE-2022-21668
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2039831
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-12 14:15 UTC by Marian Rehak
Modified: 2022-01-12 15:30 UTC (History)
4 users (show)

Fixed In Version: pipenv 2022.1.8
Clone Of:
Environment:
Last Closed: 2022-01-12 15:30:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Marian Rehak 2022-01-12 14:15:29 UTC
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.

Reference:

https://github.com/pypa/pipenv/releases/tag/v2022.1.8
https://github.com/pypa/pipenv/security/advisories/GHSA-qc9x-gjcv-465w
https://github.com/pypa/pipenv/commit/439782a8ae36c4762c88e43d5f0d8e563371b46f

Comment 1 Marian Rehak 2022-01-12 14:15:45 UTC
Created pipenv tracking bugs for this issue:

Affects: fedora-all [bug 2039831]

Comment 2 Product Security DevOps Team 2022-01-12 15:30:35 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.


Note You need to log in before you can comment on or make changes to this bug.