{"answers":{"affected":"3 open source packages ship an affected version, including pdm. It affects 2 products.","exploited":"There is no known exploitation of CVE-2023-45805 in the wild and no public exploit code.","fix":"Upgrade pdm to 2.10.0 or later.","what":"CVE-2023-45805 is a high-severity vulnerability in pdm-project pdm, published on 20 Oct 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-45805 and fix it if it is affected.\n\nWhat it is: CVE-2023-45805 is a high-severity vulnerability in pdm-project pdm, published on 20 Oct 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2023-45805 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pdm (PyPI): affected all versions up to 2.9.3; no fix listed\n- pdm (PyPI): affected all versions up to 2.9.3; no fix listed\n- pdm (PyPI): affected all versions; fixed in 2.10.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-45805/ (Markdown: https://insights.sbomify.com/CVE-2023-45805/index.md)","id":"CVE-2023-45805","markdown":"https://insights.sbomify.com/CVE-2023-45805/index.md","name":"CVE-2023-45805","record":{"aliases":["DEBIAN-CVE-2023-45805","GHSA-j44v-mmf2-xvm9","PYSEC-2026-1763","UBUNTU-CVE-2023-45805","openSUSE-SU-2024:13352-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python package manager","requires_auth":"none","summary":"Attackers can craft malicious lockfiles to install unintended packages, leading to arbitrary code execution during dependency installation.","user_interaction":"required","vuln_class":"supply_chain"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"pdm","vendor":"frostming"},{"product":"unearth","vendor":"frostming"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Trojan Lockfilein pdm","id":"CVE-2023-45805","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"supply_chain","year":"2023"},"n_packages":3,"n_references":5,"next":{"headline":"Discourse vulnerable to DoS via Regexp Injection in Full Name","id":"CVE-2023-45806"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["2.9.3"],"package":"pdm","purl":null,"source":"GHSA-j44v-mmf2-xvm9"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["2.9.3"],"package":"pdm","purl":"pkg:pypi/pdm","source":"GHSA-j44v-mmf2-xvm9"},{"ecosystem":"PyPI","fixed":["2.10.0"],"introduced":["0"],"last_affected":[],"package":"pdm","purl":"pkg:pypi/pdm","source":"PYSEC-2026-1763"}],"prev":{"headline":"User requested a CVE number by mistake","id":"CVE-2023-45804"},"products":["pdm"],"published":"2023-10-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-12","vendors":["pdm-project"]},"summary":"Attackers can craft malicious lockfiles to install unintended packages, leading to arbitrary code execution during dependency installation.","url":"https://insights.sbomify.com/CVE-2023-45805/"}