{"id":"GHSA-47qc-857f-7w7f","aliases":["RUSTSEC-2026-0013"],"status":"published","title":"PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature","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.\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.","severity":{"version":"4.0","score":7.2,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-843"],"published":"2026-02-18T12:00:00Z","modified":"2026-02-23T07:26:19Z","fixes":[{"ecosystem":"crates.io","package":"pyo3","fixed_in":["0.28.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.28.0"},{"fixed":"0.28.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.28.0"},{"fixed":"0.28.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.28.0"},{"fixed":"0.28.2"}]}]}],"references":[{"url":"https://github.com/PyO3/pyo3/pull/5807#issuecomment-3913251784","tags":["web"]},{"url":"https://github.com/PyO3/pyo3/commit/75abd8602896b350fd8c778e52e0a74b4644ccca","tags":["web"]},{"url":"https://github.com/PyO3/pyo3/releases/tag/v0.28.2","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0013.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-47qc-857f-7w7f"},{"url":"https://github.com/PyO3/pyo3","tags":["package"]},{"url":"https://crates.io/crates/pyo3","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-47qc-857f-7w7f","title":"PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature","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.\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.","status":"published","published":"2026-02-19T20:25:46Z","modified":"2026-02-19T20:25:48Z","cvss":[{"version":"4.0","score":7.2,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","level":"high"}],"cwes":["CWE-843"],"updated_at":"2026-11-02T14:39:25.82905Z"}],"osv":[{"id":"GHSA-47qc-857f-7w7f","title":"PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature","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.\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.","status":"published","published":"2026-02-19T20:25:46Z","modified":"2026-02-23T07:26:19.729428Z","cvss":[{"version":"4.0","score":7.2,"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","level":"high"}],"cwes":["CWE-843"],"updated_at":"2026-11-02T15:46:36.782754Z"},{"id":"RUSTSEC-2026-0013","title":"Type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature targeting Python 3.12 and up","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.\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.","status":"published","published":"2026-02-18T12:00:00Z","modified":"2026-02-23T07:15:28Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
