# CVE-2023-45805: Trojan Lockfilein pdm

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.50% (percentile 36, 2026-11-26)
- **CWE:** CWE-20
- **Aliases:** GHSA-j44v-mmf2-xvm9, PYSEC-2026-1763
- **Published:** 2023-10-20T18:12:24.701Z
- **Modified:** 2026-07-07T17:56:08.955Z

## Who should check

- Projects that depend on PyPI package pdm (\<= 2.9.3)
- Anyone running pdm-project pdm \>= 2.0.0,\< 2.9.4

## 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.

## Affected and fixed versions

- PyPI `pdm`: affected \<= 2.9.3; fixed 2.10.0 (osv)
- pdm-project pdm: \>= 2.0.0,\< 2.9.4 (cvelist)

## Mitigation

- Upgrade pdm to 2.10.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-45805. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-45805.md
Affected: pdm <= 2.9.3
Fixed in: 2.10.0

Steps:
1. Search this machine and project for pdm (PyPI), pdm-project pdm: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-45805 being exploited?

There is no confirmed exploitation: CVE-2023-45805 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.50% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-45805?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2023-45805?

pdm \<= 2.9.3.

### Is there a fix for CVE-2023-45805?

Yes. Fixed in 2.10.0. Upgrade pdm to 2.10.0 or later.

### How do I check if I'm affected by CVE-2023-45805?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-45805>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-j44v-mmf2-xvm9> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-1763> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-45805> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-45805>
