NetSight
high7.2No CVE yet

GHSA-47qc-857f-7w7f

PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature

Impact

PyO3 0.28.1 added support for `#[pyclass(extends=PyList)] struct NativeSub` (and other native types) when targeting Python 3.12 and up with the `abi3` feature. It was discovered that subclasses of such classes would use the type of the subclass when attempting to access to data of `NativeSub` contained within Python objects, amounting to memory corruption. PyO3 0.28.2 fixed the issue by using the type of (e.g.) `NativeSub` correctly.

An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of data being read, high risk of data or systems being changed, high risk of outages.

Affected packages

EcosystemPackageAffectedFixed in
rustpyo3>= 0.28.0, < 0.28.20.28.2

Weakness classification

References