GHSA-47qc-857f-7w7f json
PyO3 has type confusion when accessing data from sublasses of subclasses of native types with `abi3` feature
published 8mo ago modified 8mo ago also RUSTSEC-2026-0013
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io pyo3 0.28.2
- github.com/PyO3/pyo3@75abd86 commit
- github.com/PyO3/pyo3#5807 pull request
- github.com/PyO3/pyo3/releases/tag/v0.28.2 release
Is GHSA-47qc-857f-7w7f in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | pyo3 | >=0.28.0, <0.28.2 |
0.28.2 |
Classification
- Weakness
-
- CWE-843 Access of Resource Using Incompatible Type
References
-
github.com
/PyO3/pyo3/pull/5807#issuecomment-3913251784
web
-
github.com
/PyO3/pyo3/commit/75abd8602896b350fd8c778e52e0a74b4644ccca
web
-
github.com
/PyO3/pyo3
package
-
github.com
/PyO3/pyo3/releases/tag/v0.28.2
web
-
rustsec.org
/advisories/RUSTSEC-2026-0013.html
web, advisory
-
crates.io
/crates/pyo3
package
Sources
- GitHub Advisory GHSA-47qc-857f-7w7f
- OSV RUSTSEC-2026-0013
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.