Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830982 (CVE-2022-21668) - <dev-python/pipenv-2022.1.8: code execution via crafted requirements.txt file
Summary: <dev-python/pipenv-2022.1.8: code execution via crafted requirements.txt file
Status: RESOLVED FIXED
Alias: CVE-2022-21668
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
URL: https://github.com/pypa/pipenv/securi...
Whiteboard: ~2 [noglsa]
Keywords:
Depends on: 831088
Blocks:
  Show dependency tree
 
Reported: 2022-01-11 03:33 UTC by John Helmert III
Modified: 2022-08-16 22:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-11 03:33:22 UTC
CVE-2022-21668:

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.
Comment 1 Larry the Git Cow gentoo-dev 2022-01-12 22:38:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a0ef72d2208774b6598ff30da002c07f7569934

commit 1a0ef72d2208774b6598ff30da002c07f7569934
Author:     Oz N Tiram <oz.tiram@gmail.com>
AuthorDate: 2022-01-11 09:20:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-12 22:38:05 +0000

    dev-python/pipenv: add 2022.1.8
    
    Dropped ~x86 due to unkeyworded dev-python/cerberus,
    rekeywording pending.
    
    Bug: https://bugs.gentoo.org/830982
    Signed-off-by: Oz N Tiram <oz.tiram@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23720
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/pipenv/Manifest                         |   1 +
 ...ipenv-2022-1-8-remove-first-vendor-import.patch | 162 +++++++++++++++++++++
 dev-python/pipenv/pipenv-2022.1.8.ebuild           |  96 ++++++++++++
 3 files changed, 259 insertions(+)
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 01:02:40 UTC
Thanks! Please cleanup when able
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-16 22:41:17 UTC
Tree is clean.