{"id":"CVE-2020-35917","aliases":["EUVD-2021-1519","GHSA-2vx6-fcw6-hpr6","RUSTSEC-2020-0074"],"status":"published","title":"Reference counting error in pyo3","description":"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\u003cPy\u003cT\u003e\u003e.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00393,"percentile":0.33738,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2020-11-28T12:00:00Z","modified":"2026-10-24T10:30:38Z","fixes":[{"ecosystem":"crates.io","package":"pyo3","fixed_in":["0.12.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.12.0"},{"fixed":"0.12.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.12.0"},{"fixed":"0.12.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"pyo3","ranges":[{"type":"SEMVER","events":[{"introduced":"0.12.0"},{"fixed":"0.12.4"}]}]}],"products":[{"vendor":"pyo3_project","product":"pyo3"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0074.html","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35917","tags":["advisory"]},{"url":"https://github.com/PyO3/pyo3/pull/1297","tags":["web"]},{"url":"https://github.com/PyO3/pyo3/commit/8f81f595dd770b586c7ca7195b42004a6c976eb9","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2vx6-fcw6-hpr6"},{"url":"https://github.com/PyO3/pyo3","tags":["package"]},{"url":"https://crates.io/crates/pyo3","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-35917","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2020-12-31T08:18:37Z","modified":"2024-08-04T17:16:13.19Z","updated_at":"2026-11-02T14:35:57.67317Z"}],"euvd":[{"id":"EUVD-2021-1519","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2020-12-31T08:18:37Z","modified":"2024-08-04T17:16:13Z","updated_at":"2026-11-03T03:07:04.595509Z"}],"ghsa":[{"id":"GHSA-2vx6-fcw6-hpr6","title":"Reference counting error in pyo3","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2021-08-25T20:49:52Z","modified":"2023-09-18T20:33:15Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:37:05.567008Z"}],"nvd":[{"id":"CVE-2020-35917","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2020-12-31T09:15:15.833Z","modified":"2026-06-17T03:14:36.11Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","level":"low","assessor":"primary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:06:28.340168Z"}],"osv":[{"id":"CVE-2020-35917","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2020-12-31T09:15:15.833Z","modified":"2026-10-24T10:30:38.860974311Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:16.612899Z"},{"id":"GHSA-2vx6-fcw6-hpr6","title":"Reference counting error in pyo3","description":"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\u003cPy\u003cT\u003e\u003e.","status":"published","published":"2021-08-25T20:49:52Z","modified":"2023-11-08T04:03:39.286074Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:34.700741Z"},{"id":"RUSTSEC-2020-0074","title":"Reference counting error in `From\u003cPy\u003cT\u003e\u003e`","description":"A bug in `From\u003cPy\u003cT\u003e\u003e` would lead to an extra reference count decrement, often\nleading to use-after-free issues.","status":"published","published":"2020-11-28T12:00:00Z","modified":"2023-11-08T04:03:39.286074Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
