Out-of-bounds Read Affecting pyo3 package, versions >=0.24.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-17394032
  • published22 Jun 2026
  • disclosed11 Jun 2026
  • creditUnknown

Introduced: 11 Jun 2026

New CVE NOT AVAILABLE CWE-125  (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 Out-of-bounds Read in the nth and nth_back methods of iterators for lists and tuples due to unchecked arithmetic operations on indices. An attacker can access memory outside the intended bounds by supplying a sufficiently large value to these methods, potentially leading to reading previously yielded elements or arbitrary memory past the end of the storage.

CVSS Base Scores

version 4.0
version 3.1