GHSA-47qc-857f-7w7f
high
PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature
- Severity
- high CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2026-0013
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| pyo3 (crates.io) | from 0.28.0 before 0.28.2 | GitHub Advisory Database, RustSec Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-47qc-857f-7w7f changed 2026-02-23 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0013 changed 2026-02-23 | CC0-1.0 |