Files
vuln-osv/data/crates.io/GHSA-chgr-c6px-7xpp.json
T

1 line
2.0 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"schema_version":"1.9.0","id":"GHSA-chgr-c6px-7xpp","published":"2026-06-12T20:09:05Z","modified":"2026-09-10T03:51:08.468075809Z","aliases":["RUSTSEC-2026-0177"],"summary":"PyO3 has a missing `Sync` bound on `PyCFunction::new_closure` closures","details":"`PyCFunction::new_closure` (and the temporary `new_closure_bound` complement in the 0.21–0.22 series) required the supplied closure to be `Send + 'static` but not `Sync`. The resulting `PyCFunction` is a Python callable that can be invoked from any Python thread, which means the closure may be called concurrently from multiple threads, and needs a `Sync` bound to prevent possible data races.\n\nThe problem exists under all Python versions but is particularly vulnerable under the newer free-threaded Python variant, which do not have serial execution imposed by the Global Interpreter Lock. Under releases protected by the GIL, the ability to \"detach\" from the Python interpreter temporarily inside the closure (e.g. by `Python::detach`) makes it possible for interleaved and/or concurrent execution of various portions of the closure.\n\nPyO3 0.29.0 added a `Sync` bound to close this thread-safety bug.","affected":[{"package":{"name":"pyo3","ecosystem":"crates.io","purl":"pkg:cargo/pyo3"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.29.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-chgr-c6px-7xpp/GHSA-chgr-c6px-7xpp.json"}}],"references":[{"type":"WEB","url":"https://github.com/PyO3/pyo3/pull/6096"},{"type":"PACKAGE","url":"https://github.com/PyO3/pyo3"},{"type":"WEB","url":"https://github.com/PyO3/pyo3/releases/tag/v0.29.0"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0177.html"}],"database_specific":{"cwe_ids":["CWE-362"],"github_reviewed":true,"github_reviewed_at":"2026-06-12T20:09:05Z","nvd_published_at":null,"severity":"MODERATE"},"severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"}]}