CVE-2024-9979
MEDIUM5.3EPSS 0.07%Risk of use-after-free in `borrowed` reads from Python weak references
Published: 10/15/2024Modified: 4/28/2026
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.
Affected packages (3)
- crates.io/pyo3>= 0.22.0, < 0.22.4
- crates.io/pyo3>= 0.22.0, < 0.22.4
- Debian/rust-pyo3from 0, < 0.22.5-1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | 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 |
| osv | CVSS 3.1 | MEDIUM5.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
References (8)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2024-9979
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-9979
- PATCHhttps://github.com/PyO3/pyo3
- WEBhttps://access.redhat.com/security/cve/CVE-2024-9979
- WEBhttps://bugzilla.redhat.com/show_bug.cgi?id=2318646
- WEBhttps://crates.io/crates/pyo3
- WEBhttps://github.com/PyO3/pyo3/pull/4590
- WEBhttps://rustsec.org/advisories/RUSTSEC-2024-0378.html