Critical Vulnerability in PDM Package: Malicious Dependency Installation Risk

pdm Updated 02 Oct 2025

Summary

20/10/2023
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2023-45805: pdm is a Python package and dependency manager supporting the latest PEP standards. Affects pdm versions < 2.20.0.post1+ds1-1. Fixed in 2.20.0.post1+ds1-1. 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

PDM (Python Development Master) is a modern Python package and dependency manager that supports the latest PEP standards, facilitating the management of project dependencies in a streamlined manner. It allows developers to define and install packages efficiently, ensuring compatibility with Python's evolving ecosystem. However, a significant vulnerability has been identified that could compromise the integrity of installed dependencies.

Vulnerability Detail

The vulnerability arises from the ability to craft a malicious 'pdm.lock' file that can mislead PDM into installing a different package than intended. An attacker can create a project with a name similar to a trusted package, allowing them to exploit the versioning system. For instance, a project named 'foo-2' could be uploaded to PyPI, which PDM would interpret as 'foo' version '2-2', despite it being an invalid version according to PEP 440. This discrepancy can lead to arbitrary code execution during installation and facilitate downgrade attacks by merely altering the version number.

How To Fix

Minimum fixed version

2.20.0.post1+ds1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pdm

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

Workaround

Currently, there are no known workarounds for this vulnerability other than upgrading to the patched version of PDM.

Conclusion

The identified vulnerability in the PDM package poses a significant risk to users by allowing malicious packages to be installed under the guise of trusted dependencies. It is imperative for users to upgrade to the latest patched version to mitigate these risks and ensure the integrity of their projects.

See every vulnerability recorded for pdm →

Share this vulnerability

FAQ

The vulnerability allows for the installation of malicious packages by manipulating the 'pdm.lock' file, leading to potential arbitrary code execution.

If you are using PDM versions prior to 2.20.0.post1+ds1-1, your project may be vulnerable. You can check your version using the command 'pdm --version'.

While there are no workarounds, it is crucial to monitor your dependencies closely and consider using tools like Vulert to check for vulnerabilities in your project.

Vulert is a tool that monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json. You can check your application for vulnerabilities in real-time without needing to install anything.

Detailed information can be found in the Debian CVE database or by visiting the official PDM repository for updates and patches.

Related vulnerabilities

Recent vulnerabilities recorded for pdm.

How To Fix

Minimum fixed version

2.20.0.post1+ds1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pdm

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