Directory Traversal Vulnerability in Python Pip Package: CVE-2019-20916

python-pip Updated 03 Oct 2025

Summary

04/09/2020
N/A
No i
High
7.5

UBUNTU-CVE-2019-20916: The pip package before 19.2 for Python allows Directory Traversal when a URL is given in an install command, because a Content-Disposition header can have ../ in a filename, as demonstrated by overwriting the /root/.ssh/... Affects python-pip versions 1.4.1-2 – 1.5.4-1ubuntu4+esm5. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Python Pip package is a widely used package management system for Python, enabling users to install and manage software packages written in Python. It is essential for developers to easily access and utilize libraries and frameworks. However, certain versions of Pip are vulnerable to a directory traversal issue, which could lead to unauthorized file access and manipulation.

Vulnerability Detail

The vulnerability, identified as CVE-2019-20916, arises from the handling of the Content-Disposition header in HTTP responses during the installation of packages. Specifically, if a URL is provided in the install command, the header can contain '../' in the filename, allowing attackers to overwrite sensitive files, such as the /root/.ssh/authorized_keys file. This flaw can lead to severe security breaches, including unauthorized access to systems.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using URLs in the install command that could be manipulated to include directory traversal sequences. Instead, use trusted package sources or local files for installations.

Conclusion

CVE-2019-20916 is a significant vulnerability in the Python Pip package that can lead to directory traversal attacks. Users are advised to update their Pip installations to the latest versions to mitigate this risk and ensure the security of their systems.

See every vulnerability recorded for python-pip →

Share this vulnerability

FAQ

CVE-2019-20916 is a directory traversal vulnerability in the Python Pip package that allows attackers to overwrite sensitive files.

Affected versions include those prior to 19.2, specifically versions 1.5.4, 8.1.1, and 9.0.1 for various Ubuntu distributions.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to sensitive files, potentially compromising system security.

Ensure that you update to the latest patched version of Python Pip and avoid using untrusted URLs in installation commands.

Related vulnerabilities

Recent vulnerabilities recorded for python-pip.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback