# CVE-2023-31543: pipreqs vulnerable to Dependency Confusion

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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): 1.18%, higher than 68% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2023-06-30T00:00:00.000Z
- Modified: 2026-06-17T05:57:09.227Z
- Also known as: GHSA-v4f4-23wc-99mh, PYSEC-2023-99
- Weaknesses: CWE-427
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## Description

A dependency confusion in pipreqs v0.3.0 to v0.4.11 allows attackers to execute arbitrary code via uploading a crafted PyPI package to the chosen repository server.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pipreqs (PyPI): from 0.3.0 before 0.4.12
- pipreqs_project pipreqs: from 0.3.0 up to 0.4.11

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/bndr/pipreqs/pull/364> (exploit, advisory, evidence, fix, mitigation, patch, vendor-advisory, web)
- <https://gist.github.com/adeadfed/ccc834440af354a5638f889bee34bafe> (exploit, evidence, mitigation, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-31543> (advisory)
- <https://github.com/bndr/pipreqs/commit/3f5964fcb90ec6eb6df46d78e651a1b73538d0ba> (web)
- <https://github.com/bndr/pipreqs> (package)
- <https://github.com/bndr/pipreqs/blob/master/pipreqs/pipreqs.py#L447-L449> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pipreqs/PYSEC-2023-99.yaml> (web)
- <https://github.com/advisories/GHSA-v4f4-23wc-99mh> (advisory)

## Sources

- CVE List: [CVE-2023-31543](https://www.cve.org/CVERecord?id=CVE-2023-31543), CVE Terms of Use, modified 2024-11-26
- GitHub Advisory Database: [GHSA-v4f4-23wc-99mh](https://github.com/advisories/GHSA-v4f4-23wc-99mh), CC-BY-4.0, modified 2024-10-14
- NVD: [CVE-2023-31543](https://nvd.nist.gov/vuln/detail/CVE-2023-31543), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-99](https://osv.dev/vulnerability/PYSEC-2023-99), CC-BY-4.0, modified 2026-06-10

---

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