Critical Vulnerability in python-pip: Denial of Service Risk Due to Improper Filename Validation

python-pip Updated 03 Oct 2025

Summary

28/02/2023
N/A
Yes i
Unrated
Not published

USN-5821-3: python-pip regression. Affects python-pip versions < 1.5.4-1ubuntu4+esm3. Fixed in 1.5.4-1ubuntu4+esm3. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

python-pip is a package management system for Python that allows users to install and manage software packages written in Python. It is widely used in various applications and environments. The vulnerability in question affects multiple versions of python-pip across different Ubuntu LTS releases, making it crucial for users to be aware of its implications and to take necessary actions to mitigate risks.

Vulnerability Detail

USN-5821-1 revealed a vulnerability in the python-pip package, specifically related to how it handles certain file names against a regex expression. This flaw could allow an attacker to exploit the system, potentially leading to a denial of service. The vulnerability is tied to CVE-2022-40898, which emphasizes the need for immediate attention to the affected versions of python-pip.

How To Fix

Minimum fixed version

1.5.4-1ubuntu4+esm3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-pip

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not possible, consider restricting access to the affected systems and monitoring for unusual activity until the patch can be applied.

Conclusion

The python-pip vulnerability outlined in USN-5821-3 poses a significant risk of denial of service due to improper filename validation. It is crucial for users to update their packages to the patched versions to mitigate this risk. Regular monitoring and prompt action are essential to maintain the security of your applications.

See every vulnerability recorded for python-pip →

Share this vulnerability

FAQ

The vulnerability allows for improper handling of file names, which could lead to a denial of service.

Versions across Ubuntu 14.04, 16.04, 18.04, 20.04, and 22.04 LTS are affected.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without signup.

Failure to address this vulnerability could lead to denial of service attacks, impacting the availability of your applications.

No subscription is required for the patches available for Ubuntu 18.04, 20.04, and 22.04 LTS.

Related vulnerabilities

Recent vulnerabilities recorded for python-pip.

How To Fix

Minimum fixed version

1.5.4-1ubuntu4+esm3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-pip

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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