Skip to content
OpenAdvisories
Medium · 5.3 CVE-2024-9979 EUVD-2024-2969GHSA-6jgw-rgmm-7cv6RUSTSEC-2024-0378

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

Published Oct 15, 2024 · Updated Nov 5, 2026 · 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.

Affected products

VendorProductAffectedFixed
— pyo3 0.22.0 – < 0.22.4 0.22.4
Red Hat Red Hat Ansible Automation Platform 2 — —
Red Hat Red Hat Enterprise Linux 10 — —
Red Hat Red Hat Enterprise Linux 8 — —
Red Hat Red Hat Enterprise Linux 9 — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 rust-pyo3 0.22.5-1 —
Debian 13 rust-pyo3 0.22.5-1 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io pyo3 >= 0.22.0, < 0.22.4 0.22.4 GHSA-6jgw-rgmm-7cv6

References