# CVE-2023-45805: Trojan Lockfilein pdm

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-10-20T18:12:24.701Z
- Modified: 2026-07-07T17:56:08.955Z
- Also known as: GHSA-j44v-mmf2-xvm9, PYSEC-2026-1763
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- pdm-project pdm: >= 2.0.0,< 2.9.4
- frostming pdm: from 2.0.0 before 2.10.0
- frostming unearth: before 0.11.2
- pdm (PyPI): up to 2.9.3; before 2.10.0

## Every score

- GitHub_M: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/pdm-project/pdm/security/advisories/GHSA-j44v-mmf2-xvm9> (exploit, vendor-advisory, web)
- <https://github.com/pdm-project/pdm/commit/6853e2642dfa281d4a9958fbc6c95b7e32d84831> (fix, patch, vendor-advisory, web)
- <https://github.com/frostming/unearth/blob/eca170d9370ac5032f2e497ee9b1b63823d3fe0f/src/unearth/evaluator.py#L215-L229> (product, web)
- <https://github.com/pdm-project/pdm/blob/45d1dfa47d4900c14a31b9bb761e4c46eb5c9442/src/pdm/models/candidates.py#L98-L99> (product, web)
- <https://peps.python.org/pep-0440/#post-release-spelling> (not-applicable, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-45805> (advisory)
- <https://github.com/pdm-project/pdm> (package)
- <https://pypi.org/project/pdm> (package)
- <https://github.com/advisories/GHSA-j44v-mmf2-xvm9> (advisory)

## Sources

- CVE List: [CVE-2023-45805](https://www.cve.org/CVERecord?id=CVE-2023-45805), CVE Terms of Use, modified 2024-09-12
- GitHub Advisory Database: [GHSA-j44v-mmf2-xvm9](https://github.com/advisories/GHSA-j44v-mmf2-xvm9), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2023-45805](https://nvd.nist.gov/vuln/detail/CVE-2023-45805), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1763](https://osv.dev/vulnerability/PYSEC-2026-1763), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2023-45805 · Whole record: https://cve.day/CVE-2023-45805.json · Rebuilt by cve.day 2026-11-25T22:58:28.988Z
