p PatchFirst

CVE-2022-21668

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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 8.0 · High · EPSS 3.8% · Fix available

Published
Updated

Stack: system · python

Affected products and versions

  • pipenv

    Versions
    • >= 2018.10.9, < 2022.1.8: Affected

    No fix published

  • pipenv PyPI

    Versions
    • 2018.10.13
    • 2018.10.9
    • 2018.11.14
    • 2018.11.26
    • 2020.11.15
    • 2020.11.4
    • 2020.4.1b1
    • 2020.4.1b2
    • 2020.5.28
    • 2020.6.2
    • 2020.8.13
    • 2021.11.15
    • 2021.11.23
    • 2021.11.5
    • 2021.11.5.post0
    • 2021.11.9
    • 2021.5.29
    Affected ranges
    • ECOSYSTEM: ≥ 2018.10.9, < 2022.1.8

    Update to 2022.1.8

  • pipenv PyPI

    Versions
    • 2018.10.13
    • 2018.10.9
    • 2018.11.14
    • 2018.11.26
    • 2020.11.15
    • 2020.11.4
    • 2020.4.1b1
    • 2020.4.1b2
    • 2020.5.28
    • 2020.6.2
    • 2020.8.13
    • 2021.11.15
    • 2021.11.23
    • 2021.11.5
    • 2021.11.5.post0
    • 2021.11.9
    • 2021.5.29
    Affected ranges
    • GIT: < 439782a8ae36c4762c88e43d5f0d8e563371b46f
    • ECOSYSTEM: ≥ 2018.10.9, < 2022.1.8

    Update to 2022.1.8

  • pipenv Ubuntu:20.04:LTS

    Versions
    • 11.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pipenv Ubuntu:22.04:LTS

    Versions
    • 11.9.0-1.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pipenv 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
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pipenv Ubuntu:25.10

    Versions
    • 2024.0.1+ds-2
    • 2024.0.1+ds-3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pipenv Ubuntu:26.10

    Versions
    • 2024.0.1+ds-4
    • 2026.0.3+ds-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pipenv Ubuntu:26.04:LTS

    Versions
    • 2024.0.1+ds-3
    • 2024.0.1+ds-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →