{"id":"CVE-2024-9979","aliases":["DEBIAN-CVE-2024-9979","EUVD-2024-2969","GHSA-6jgw-rgmm-7cv6","RUSTSEC-2024-0378","UBUNTU-CVE-2024-9979"],"status":"published","title":"Pyo3: risk of use-after-free in `borrowed` reads from python weak references","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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.00206,"percentile":0.10643,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2024-10-12T12:00:00Z","modified":"2026-11-05T14:45:39Z","fixes":[{"ecosystem":"crates.io","package":"pyo3","fixed_in":["0.22.4"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"rust-pyo3","fixed_in":["0.22.5-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rust-pyo3","fixed_in":["0.22.5-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.22.0"},{"fixed":"0.22.4"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rust-pyo3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.5-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rust-pyo3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.5-1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.22.0"},{"fixed":"0.22.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.22.0"},{"fixed":"0.22.4"}]}]}],"products":[{"vendor":"red hat","product":"red hat ansible automation platform 2"},{"vendor":"red hat","product":"red hat enterprise linux 10"},{"vendor":"red hat","product":"red hat enterprise linux 8"},{"vendor":"red hat","product":"red hat enterprise linux 9"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2024-9979","tags":["vdb-entry","x_refsource_REDHAT","advisory","web"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2318646","tags":["issue-tracking","x_refsource_REDHAT","report","web"]},{"url":"https://crates.io/crates/pyo3","tags":["web","package"]},{"url":"https://github.com/PyO3/pyo3/pull/4590","tags":["fix","web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0378.html","tags":["advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-9979","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6jgw-rgmm-7cv6"},{"url":"https://access.redhat.com/downloads/content/package-browser/","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/9xxx/CVE-2024-9979.json","tags":["advisory"]},{"url":"https://github.com/PyO3/pyo3","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-9979","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-9979","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-9979","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-9979","title":"Pyo3: risk of use-after-free in `borrowed` reads from python weak references","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.","status":"published","published":"2024-10-15T14:01:54.309Z","modified":"2026-11-05T14:45:39.461Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-416"],"updated_at":"2026-11-05T16:36:33.176634Z"}],"euvd":[{"id":"EUVD-2024-2969","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.","status":"published","published":"2024-10-15T14:01:54Z","modified":"2026-11-05T14:45:39Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-05T16:59:57.067043Z"}],"ghsa":[{"id":"GHSA-6jgw-rgmm-7cv6","title":" PyO3 has a risk of use-after-free in `borrowed` reads from Python weak references","description":"The family of functions to read \"borrowed\" values from Python weak references were fundamentally unsound, because the weak reference does itself not have ownership of the value. At any point the last strong reference could be cleared and the borrowed value would become dangling.\n\nIn PyO3 0.22.4 these functions have all been deprecated and patched to leak a strong reference as a mitigation. PyO3 0.23 will remove these functions entirely.","status":"published","published":"2024-10-15T15:30:56Z","modified":"2024-10-15T17:04:56Z","cvss":[{"version":"4.0","score":4.8,"vector":"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","level":"medium"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:38:10.696798Z"}],"nvd":[{"id":"CVE-2024-9979","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.","status":"published","published":"2024-10-15T14:15:05.817Z","modified":"2026-11-05T15:17:05.87Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-416"],"updated_at":"2026-11-05T19:55:50.758755Z"}],"osv":[{"id":"CVE-2024-9979","title":"Pyo3: risk of use-after-free in `borrowed` reads from python weak references","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.","status":"published","published":"2024-10-15T14:01:54.309Z","modified":"2026-11-07T02:30:50.890701858Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-416"],"updated_at":"2026-11-07T03:07:55.264406Z"},{"id":"DEBIAN-CVE-2024-9979","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.","status":"published","published":"2024-10-15T14:15:05.817Z","modified":"2026-11-02T12:03:13.256742007Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T15:45:44.747956Z"},{"id":"GHSA-6jgw-rgmm-7cv6","title":" PyO3 has a risk of use-after-free in `borrowed` reads from Python weak references","description":"The family of functions to read \"borrowed\" values from Python weak references were fundamentally unsound, because the weak reference does itself not have ownership of the value. At any point the last strong reference could be cleared and the borrowed value would become dangling.\n\nIn PyO3 0.22.4 these functions have all been deprecated and patched to leak a strong reference as a mitigation. PyO3 0.23 will remove these functions entirely.","status":"published","published":"2024-10-15T15:30:56Z","modified":"2025-10-28T06:29:04.991816Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"},{"version":"4.0","score":4.8,"vector":"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","level":"medium"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"UBUNTU-CVE-2024-9979","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.","status":"withdrawn","published":"2024-10-15T14:15:00Z","modified":"2026-02-09T06:28:48.194109Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T16:55:18.664792Z"},{"id":"RUSTSEC-2024-0378","title":"Risk of use-after-free in `borrowed` reads from Python weak references","description":"The family of functions to read \"borrowed\" values from Python weak references\nwere fundamentally unsound, because the weak reference does itself not have\nownership of the value. At any point the last strong reference could\nbe cleared and the borrowed value would become dangling.\n\nIn PyO3 0.22.4 these functions have all been deprecated and patched to leak a\nstrong reference as a mitigation. PyO3 0.23 will remove these functions entirely.","status":"published","published":"2024-10-12T12:00:00Z","modified":"2025-10-28T06:29:04.991816Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
