Race Condition Affecting pyo3 package, versions >=0.15.0 <0.29.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-PYO3-17394029
  • published22 Jun 2026
  • disclosed11 Jun 2026
  • creditUnknown

Introduced: 11 Jun 2026

New CVE NOT AVAILABLE CWE-362  (opens in a new tab)

How to fix?

Upgrade pyo3 to version 0.29.0 or higher.

Overview

pyo3 is a package that provides Rust bindings for Python. This includes running and interacting with Python code from a Rust binary, as well as writing native Python modules.

Affected versions of this package are vulnerable to Race Condition through the new_closure and new_closure_bound functions. An attacker can trigger data races or cause undefined behavior by invoking Python callables from multiple threads concurrently, as the closures lack the necessary thread-safety guarantees.

CVSS Base Scores

version 4.0
version 3.1