CVE-2023-45805 json
Trojan Lockfilein pdm
published 2023-10-20 3 y ago modified 2026-07-07 4 mo ago also GHSA-j44v-mmf2-xvm9 , PYSEC-2026-1763 , EUVD-2023-2755
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 39%
- public exploits
- 0
- none known
Summary
pdm is a Python package and dependency manager supporting the latest PEP standards. It's possible to craft a malicious `pdm.lock` file that could allow e.g. an insider or a malicious open source project to appear to depend on a trusted PyPI project, but actually install another project. A project `foo` can be targeted by creating the project `foo-2` and uploading the file `foo-2-2.tar.gz` to pypi.org. PyPI will see this as project `foo-2` version `2`, while PDM will see this as project `foo` version `2-2`. The version must only be `parseable as a version` and the filename must be a prefix of the project name, but it's not verified to match the version being installed. Version `2-2` is also not a valid normalized version per PEP 440. Matching the project name exactly (not just prefix) would fix the issue. When installing dependencies with PDM, what's actually installed could differ from what's listed in `pyproject.toml` (including arbitrary code execution on install). It could also be used for downgrade attacks by only changing the version. This issue has been addressed in commit `6853e2642df` which is included in release version `2.9.4`. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Patch / fix
- pypi pdm 2.10.0
- frostming pdm 2.10.0
- frostming unearth 0.11.2
- pdm Debian 14, Debian 13 2.20.0.post1+ds1-1
debian advisories DEBIAN-CVE-2023-45805
- python-unearth openSUSE Tumbleweed 0.18.3-1.1
opensuse advisories openSUSE-SU-2026:11541-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-45805 updated
python-pdm: Malicious pdm.lock file can install a different project while appearing to depend on a trusted PyPI project
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.45% chance of exploitation in the next 30 days, higher than 39% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/pdm-project/pdm/security/advisories/GHSA-j44v-mmf2-xvm9 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pdm | <=2.9.3 <2.10.0 |
2.10.0 |
Affected products
- pdm-project pdm
- frostming pdm
- frostming unearth
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/pdm-project/pdm/commit/6853e2642dfa281d4a9958fbc6c95b7e32d84831
web, patch, vendor-advisory
-
github.com
/pdm-project/pdm/security/advisories/GHSA-j44v-mmf2-xvm9
web, exploit, vendor-advisory
-
github.com
/frostming/unearth/blob/eca170d9370ac5032f2e497ee9b1b63823d3fe0f/src/unearth/evaluator.py#L215-L229
web, product
-
github.com
/pdm-project/pdm/blob/45d1dfa47d4900c14a31b9bb761e4c46eb5c9442/src/pdm/models/candidates.py#L98-L99
web, product
-
peps.python.org
/pep-0440/#post-release-spelling
web, not-applicable
-
nvd.nist.gov
/vuln/detail/CVE-2023-45805
advisory
-
github.com
/pdm-project/pdm
package
-
pypi.org
/project/pdm
package
-
github.com
/advisories/GHSA-j44v-mmf2-xvm9
advisory
Sources
- CVE List CVE-2023-45805
- GitHub Advisory GHSA-j44v-mmf2-xvm9
- NVD CVE-2023-45805
- OSV PYSEC-2026-1763
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.