CVE-2022-21668: fedoraproject fedora Improper Input Validation
Vulnerability summary
CVE-2022-21668 is a high (CVSS 9.3) Improper Input Validation vulnerability in fedoraproject fedora. EPSS estimates a 3.81% chance of exploitation in the next 30 days, higher than 89.9% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 10-01-2022PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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 metrics
6 scores · 4 sources · 3 versions- OSV · PypiEcosystem advisory · calculated8.0HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated8.6HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HDiffers
- NVDNIST8.6HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HDiffers
EPSS trend
Probability
3.81%
Chance of exploitation in the next 30 days
Percentile
90%
Versus all other CVEs
30-day change
-0.09 pp
From 3.90% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPipenv
Maturity: poc
Weaknesses
CWE · root cause- CWE-20Improper Input ValidationThe product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
- CWE-77Improper Neutralization of Special Elements used in a Command ('Command Injection')The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
- CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
- CWE-427Uncontrolled Search Path ElementThe product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
- CWE-791Incomplete Filtering of Special ElementsThe product receives data from an upstream component, but does not completely filter special elements before sending it to a downstream component.
- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
- CWE-1284Improper Validation of Specified Quantity in InputThe product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.
Affected systems
Fedoraproject1 product
- fedoraEOL34 | 35 | 36
Pypa1 product
- pipenv≥ 2018.10.9, < 2022.1.8
PyPI1 product
- pipenv< 439782a8ae36c4762c88e43d5f0d8e563371b46f | ≥ 2018.10.9, < 2022.1.8
Ubuntu1 product
- pipenvAll versions (No fix recorded)
4 vendors · 4 products
References
14 links- github.com/pypa/pipenv/security/advisories/GHSA-qc9x-gjcv-465wX Refsource CONFIRMWEBAdvisoryREPORTExploitThird Party Advisory
- github.com/pypa/pipenv/commit/439782a8ae36c4762c88e43d5f0d8e563371b46fX Refsource MISCWEBFIXREPORTPatchThird Party Advisory
- github.com/pypa/pipenv/releases/tag/v2022.1.8X Refsource MISCWEBREPORTRelease NotesThird Party Advisory
- github.com/pypa/pipenvPACKAGE