{"answers":{"affected":"3 open source packages ship an affected version, including pyo3.","exploited":"There is no known exploitation of GHSA-chgr-c6px-7xpp in the wild and no public exploit code.","fix":"Upgrade pyo3 to 0.29.0 or later.","what":"GHSA-chgr-c6px-7xpp is a vulnerability in pyo3, published on 11 Jun 2026."},"fix_prompt":"Check this codebase for GHSA-chgr-c6px-7xpp and fix it if it is affected.\n\nWhat it is: GHSA-chgr-c6px-7xpp is a vulnerability in pyo3, published on 11 Jun 2026. \nExploitation: There is no known exploitation of GHSA-chgr-c6px-7xpp 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.0.0-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-chgr-c6px-7xpp/ (Markdown: https://insights.sbomify.com/GHSA-chgr-c6px-7xpp/index.md)","id":"GHSA-chgr-c6px-7xpp","markdown":"https://insights.sbomify.com/GHSA-chgr-c6px-7xpp/index.md","name":"GHSA-chgr-c6px-7xpp","record":{"aliases":["RUSTSEC-2026-0177"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust Python binding library","requires_auth":"none","summary":"Missing Sync bound in PyO3 allows concurrent closure execution, potentially causing data races and memory corruption in multi-threaded Python environments.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`PyCFunction::new_closure` (and the temporary `new_closure_bound` complement in\nthe 0.21–0.22 series) required the supplied closure to be `Send + 'static` but\nnot `Sync`. The resulting `PyCFunction` is a Python callable that can be\ninvoked from any Python thread, which means the closure may be called\nconcurrently from multiple threads, and needs a `Sync` bound to prevent\npossible data races.\n\nThe problem exists under all Python versions but is particularly vulnerable under\nthe newer free-threaded Python variant, which do not have serial execution\nimposed by the Global Interpreter Lock. Under releases protected by the GIL,\nthe ability to \"detach\" from the Python interpreter temporarily inside the closure\n(e.g. by `Python::detach`) makes it possible for interleaved and/or concurrent\nexecution of various portions of the closure.\n\nPyO3 0.29.0 added a `Sync` bound to close this thread-safety bug.","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":"Missing `Sync` bound on `PyCFunction::new_closure` closures","id":"GHSA-chgr-c6px-7xpp","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"race_condition","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-chgr-c6px-7xpp"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0"],"last_affected":[],"package":"pyo3","purl":"pkg:cargo/pyo3","source":"GHSA-chgr-c6px-7xpp"},{"ecosystem":"crates.io","fixed":["0.29.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"pyo3","purl":"pkg:cargo/pyo3","source":"RUSTSEC-2026-0177"}],"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":"Missing Sync bound in PyO3 allows concurrent closure execution, potentially causing data races and memory corruption in multi-threaded Python environments.","url":"https://insights.sbomify.com/GHSA-chgr-c6px-7xpp/"}