Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2022-21668— Pipenv's requirements.txt parsing allows malicious index url in comments

Quick assessment

Affected
pypa pipenv
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Pipenv是一个工具,旨在将所有打包世界中最好的(打包程序、作曲家、npm、货物、纱线等)带到 Python 世界。 pipenv 存在命令注入漏洞,该漏洞源于允许攻击者在 requirements.txt 文件中的任何位置的注释中插入特制字符串,这将导致使用 pipenv 的受害者安装需求文件以从攻击者控制的包索引服务器下载依赖项。通过在恶意索引服务器提供的包中嵌入恶意代码,攻击者可以在受害者的系统上触发任意远程代码执行 (RCE)。

CVSS 8.0 · High EPSS 3.93% · P91
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2022-21668

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Pipenv's requirements.txt parsing allows malicious index url in comments
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
输入验证不恰当
Source: CVE Program / CVE List V5
Vulnerability Title
Pipenv 命令注入漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Pipenv是一个工具,旨在将所有打包世界中最好的(打包程序、作曲家、npm、货物、纱线等)带到 Python 世界。 pipenv 存在命令注入漏洞,该漏洞源于允许攻击者在 requirements.txt 文件中的任何位置的注释中插入特制字符串,这将导致使用 pipenv 的受害者安装需求文件以从攻击者控制的包索引服务器下载依赖项。通过在恶意索引服务器提供的包中嵌入恶意代码,攻击者可以在受害者的系统上触发任意远程代码执行 (RCE)。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
pypa pipenv >= 2018.10.9, < 2022.1.8 -

II. Public POCs for CVE-2022-21668

# POC Description Source Link Shenlong Link
1 None https://github.com/sreeram281997/CVE-2022-21668-Pipenv-RCE-vulnerability POC Details
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-21668

请登录查看更多情报信息。

Patches & Fixes for CVE-2022-21668 (1)

Vendor Advisories for CVE-2022-21668 (1)

Mailing List Discussions for CVE-2022-21668 (3)

Other References for CVE-2022-21668 (1)

IV. Related Vulnerabilities