Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. pyo3
  4. ›
  5. CVE-2020-35917

CVE-2020-35917: Reference counting error in pyo3

August 25, 2021

An issue was discovered in the pyo3 crate before 0.12.4 for Rust. There is a reference-counting error and use-after-free in From<Py>.

References

  • github.com/PyO3/pyo3
  • github.com/PyO3/pyo3/commit/8f81f595dd770b586c7ca7195b42004a6c976eb9
  • github.com/PyO3/pyo3/pull/1297
  • github.com/advisories/GHSA-2vx6-fcw6-hpr6
  • nvd.nist.gov/vuln/detail/CVE-2020-35917
  • rustsec.org/advisories/RUSTSEC-2020-0074.html

Code Behaviors & Features

Detect and mitigate CVE-2020-35917 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.12.0 before 0.12.4

Fixed versions

  • 0.12.4

Solution

Upgrade to version 0.12.4 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-416: Use After Free

Source file

cargo/pyo3/CVE-2020-35917.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:25 +0000.