{"cve":"CVE-2022-21668","nvd":{"published":"2022-01-10T21:15:07.853","modified":"2026-06-17T04:26:43.423","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":8.6},"cwes":["CWE-190","CWE-1284","CWE-20","CWE-77","CWE-78","CWE-427","CWE-791"],"references":["https://github.com/pypa/pipenv/commit/439782a8ae36c4762c88e43d5f0d8e563371b46f","https://github.com/pypa/pipenv/releases/tag/v2022.1.8","https://github.com/pypa/pipenv/security/advisories/GHSA-qc9x-gjcv-465w","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/56HBA3EOSLEDNCCBJVHE6DO34P56EOUM/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KCROBYHUS6DKQPCXBRPCZ5CDBNQTYAWT/"],"products":["fedoraproject:fedora","pypa:pipenv"],"source":"nvd","synced_at":"2026-10-19T21:26:33.761856376+00:00"},"epss":{"cve":"CVE-2022-21668","score":0.03807,"percentile":0.90023,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-qc9x-gjcv-465w","url":"https://osv.dev/vulnerability/GHSA-qc9x-gjcv-465w","summary":"Pipenv's requirements.txt parsing allows malicious index url in comments","modified":"2024-10-14T18:50:37.935572Z","packages":[{"ecosystem":"PyPI","name":"pipenv","purl":"pkg:pypi/pipenv","ranges":[">=2018.10.9 <2022.1.8"],"fixed":["2022.1.8"]}]},{"id":"PYSEC-2022-6","url":"https://osv.dev/vulnerability/PYSEC-2022-6","summary":"","modified":"2023-11-08T04:08:06.997974Z","packages":[{"ecosystem":"PyPI","name":"pipenv","purl":"pkg:pypi/pipenv","ranges":[">=2018.10.9 <2022.1.8"],"fixed":["2022.1.8"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}