{"id":"RUSTSEC-2026-0013","summary":"Type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature targeting Python 3.12 and up","details":"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.\n\nIt 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.\n\nPyO3 0.28.2 fixed the issue by using the type of (e.g.) `NativeSub` correctly.","aliases":["GHSA-47qc-857f-7w7f"],"modified":"2026-02-23T07:15:28Z","published":"2026-02-18T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/pyo3"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0013.html"},{"type":"WEB","url":"https://github.com/PyO3/pyo3/pull/5807#issuecomment-3913251784"}],"affected":[{"package":{"name":"pyo3","ecosystem":"crates.io","purl":"pkg:cargo/pyo3"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.28.0"},{"fixed":"0.28.2"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"functions":[],"arch":[],"os":[]}},"database_specific":{"cvss":null,"informational":null,"categories":["memory-corruption"],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0013.json"}}],"schema_version":"1.7.3"}