RUSTSEC-2026-0013

Source
https://rustsec.org/advisories/RUSTSEC-2026-0013
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0013.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0013
Published
2026-02-18T12:00:00Z
Modified
2026-02-18T12:20:35.750245Z
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.

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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / pyo3

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.28.0
Fixed
0.28.2

Ecosystem specific

{
    "affects": {
        "functions": [],
        "os": [],
        "arch": []
    },
    "affected_functions": null
}

Database specific

source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0013.json"
categories
[
    "memory-corruption"
]
cvss
null
informational
null