{"answers":{"affected":"3 open source packages ship an affected version, including pyo3.","exploited":"There is no known exploitation of GHSA-36hh-v3qg-5jq4 in the wild and no public exploit code.","fix":"Upgrade pyo3 to 0.29.0 or later.","what":"GHSA-36hh-v3qg-5jq4 is a vulnerability in pyo3, published on 11 Jun 2026."},"fix_prompt":"Check this codebase for GHSA-36hh-v3qg-5jq4 and fix it if it is affected.\n\nWhat it is: GHSA-36hh-v3qg-5jq4 is a vulnerability in pyo3, published on 11 Jun 2026. \nExploitation: There is no known exploitation of GHSA-36hh-v3qg-5jq4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pyo3 (crates.io): affected all versions; fixed in 0.29.0\n- pyo3 (crates.io): affected all versions; fixed in 0.29.0\n- pyo3 (crates.io): affected from 0.24.0; fixed in 0.29.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-36hh-v3qg-5jq4/ (Markdown: https://insights.sbomify.com/GHSA-36hh-v3qg-5jq4/index.md)","id":"GHSA-36hh-v3qg-5jq4","markdown":"https://insights.sbomify.com/GHSA-36hh-v3qg-5jq4/index.md","name":"GHSA-36hh-v3qg-5jq4","record":{"aliases":["RUSTSEC-2026-0176"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust Python bindings","requires_auth":"none","summary":"Integer overflow in PyO3 iterators allows out-of-bounds memory reads, potentially exposing sensitive data or causing crashes.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"PyO3 0.24.0 added optimized implementations of `Iterator::nth` and\n`DoubleEndedIterator::nth_back` for the `BoundListIterator` and\n`BoundTupleIterator` types. These implementations computed the target index\nusing unchecked `usize` addition (`index + n`) before bounds-checking against\nthe sequence length, then read the element via `get_item_unchecked`.\n\nIn `nth` methods, a sufficiently large `n` (combined with a non-zero internal\nindex) could cause the addition to overflow and wrap around, producing a small\n\"target index\" that passed the bounds check and enabling reads at the front\nof the `list` or `tuple` of elements previously yielded by the iterator.\n\nIn `nth_back` methods, a sufficiently large `n` could cause underflow in a\nsimilar fashion, however would instead allow reads of arbitrary memory past\nthe end of the `list` or `tuple` storage.\n\nPyO3 0.29.0 has corrected these methods to use checked arithmetic at the\npositions which could be at risk of overflow.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Out-of-bounds read in `nth` / `nth_back` for `PyList` and `PyTuple` iterators","id":"GHSA-36hh-v3qg-5jq4","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"integer_overflow","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0"],"last_affected":[],"package":"pyo3","purl":null,"source":"GHSA-36hh-v3qg-5jq4"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0"],"last_affected":[],"package":"pyo3","purl":"pkg:cargo/pyo3","source":"GHSA-36hh-v3qg-5jq4"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0.24.0"],"last_affected":[],"package":"pyo3","purl":"pkg:cargo/pyo3","source":"RUSTSEC-2026-0176"}],"products":null,"published":"2026-06-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Integer overflow in PyO3 iterators allows out-of-bounds memory reads, potentially exposing sensitive data or causing crashes.","url":"https://insights.sbomify.com/GHSA-36hh-v3qg-5jq4/"}