# CVE-2024-9979: Pyo3: risk of use-after-free in `borrowed` reads from python weak references

- Severity: Medium 5.3 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- 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.24%, higher than 16% of CVEs (2026-12-02)
- Published: 2024-10-12T12:00:00.000Z
- Modified: 2026-11-24T07:17:16.330Z
- Also known as: GHSA-6jgw-rgmm-7cv6, RUSTSEC-2024-0378
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

## Description

A flaw was found in PyO3. This vulnerability causes a use-after-free issue, potentially leading to memory corruption or crashes via unsound borrowing from weak Python references.

(As written by CVE List.)

## Affected

- pyo3: from 0.22.0 before 0.22.4
- python3.11-nh3: no versions given
- python3.11-rpds-py: no versions given
- python-rpds-py: no versions given
- python3.11-cryptography: no versions given
- python3.12-cryptography: no versions given
- pyo3 (crates.io): from 0.22.0 before 0.22.4

## Every score

- redhat: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`

## References

- <https://access.redhat.com/security/cve/CVE-2024-9979> (vdb-entry, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2318646> (issue-tracking, web)
- <https://crates.io/crates/pyo3> (package, web)
- <https://github.com/PyO3/pyo3/pull/4590> (web)
- <https://rustsec.org/advisories/RUSTSEC-2024-0378.html> (advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-9979> (advisory)
- <https://github.com/PyO3/pyo3> (package)

## Sources

- CVE List: [CVE-2024-9979](https://www.cve.org/CVERecord?id=CVE-2024-9979), CVE Terms of Use, modified 2026-11-24
- GitHub Advisory Database: [GHSA-6jgw-rgmm-7cv6](https://github.com/advisories/GHSA-6jgw-rgmm-7cv6), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2024-0378](https://rustsec.org/advisories/RUSTSEC-2024-0378.html), CC0-1.0, modified 2025-10-28
- NVD: [CVE-2024-9979](https://nvd.nist.gov/vuln/detail/CVE-2024-9979), Public domain, modified 2026-11-24

---

Page: https://cve.day/CVE-2024-9979 · Whole record: https://cve.day/CVE-2024-9979.json · Rebuilt by cve.day 2026-11-25T22:58:46.758Z
