pipenv — security advisory
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.
- Products
- pipenv
- Affected versions
- 11.9.0-1, 11.9.0-1.1, 2023.10.24+ds-1, 2023.10.3+ds-1, 2023.11.15+ds-1, 2023.12.1+ds-1, 2023.7.23+ds-1, 2024.0.1+ds-2, 2024.0.1+ds-3, 2024.0.1+ds-4, 2026.0.3+ds-1
- Fixed versions
- Not specified
- CVEs
- CVE-2022-21668
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 00:45 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2022-21668
pipenv
Fixed versions: Not specified
pipenv
Fixed versions: Not specified
pipenv
Fixed versions: Not specified
pipenv
Fixed versions: Not specified
pipenv
Fixed versions: Not specified
pipenv
Fixed versions: Not specified
Complete source record
{
"id": "13a7b6c727a010a5112d3cb9a2d45226aebc632b098b86197ed86805329678f3",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2022-21668",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2022-21668",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2022-21668",
"products": [
{
"name": {
"value": "pipenv",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "11.9.0-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "pipenv",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "11.9.0-1.1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "pipenv",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2023.7.23+ds-1",
"evidence": "/affected/2/versions"
},
{
"value": "2023.10.3+ds-1",
"evidence": "/affected/2/versions"
},
{
"value": "2023.10.24+ds-1",
"evidence": "/affected/2/versions"
},
{
"value": "2023.11.15+ds-1",
"evidence": "/affected/2/versions"
},
{
"value": "2023.12.1+ds-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "pipenv",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2024.0.1+ds-2",
"evidence": "/affected/3/versions"
},
{
"value": "2024.0.1+ds-3",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "pipenv",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2024.0.1+ds-4",
"evidence": "/affected/4/versions"
},
{
"value": "2026.0.3+ds-1",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "pipenv",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2024.0.1+ds-3",
"evidence": "/affected/5/versions"
},
{
"value": "2024.0.1+ds-4",
"evidence": "/affected/5/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2022-21668",
"aliases": [
"UBUNTU-CVE-2022-21668"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"11.9.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "11.9.0-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"11.9.0-1.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "11.9.0-1.1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"2023.7.23+ds-1",
"2023.10.3+ds-1",
"2023.10.24+ds-1",
"2023.11.15+ds-1",
"2023.12.1+ds-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "2023.12.1+ds-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"2024.0.1+ds-2",
"2024.0.1+ds-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "2024.0.1+ds-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"2024.0.1+ds-4",
"2026.0.3+ds-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "2026.0.3+ds-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pipenv",
"purl": "pkg:deb/ubuntu/pipenv?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"2024.0.1+ds-3",
"2024.0.1+ds-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21668.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pipenv",
"binary_version": "2024.0.1+ds-4"
}
]
}
}
],
"modified": "2026-10-17T12:56:02.174458651Z",
"provider": "osv",
"upstream": [
"CVE-2022-21668"
],
"references": [
"https://ubuntu.com/security/CVE-2022-21668",
"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",
"https://www.cve.org/CVERecord?id=CVE-2022-21668"
]
},
"related_cves": [
{
"value": "CVE-2022-21668",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/1/score"
},
"source_id": "core-osv",
"document_id": 354627,
"published_at": "2022-01-10T21:15:00+00:00"
}