GHSA-6jgw-rgmm-7cv6

Suggest an improvement
Source
https://github.com/advisories/GHSA-6jgw-rgmm-7cv6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-6jgw-rgmm-7cv6/GHSA-6jgw-rgmm-7cv6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6jgw-rgmm-7cv6
Aliases
Published
2024-10-15T15:30:56Z
Modified
2024-10-15T17:27:13.077663Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L CVSS Calculator
  • 4.8 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
PyO3 has a risk of use-after-free in `borrowed` reads from Python weak references
Details

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.

In 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.

References

Affected packages

crates.io / pyo3

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.22.0
Fixed
0.22.4