CVE-2021-31162
published 2021-04-14CVE-2021-31162: In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
PriorityP343critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
2.89%
85.3th percentile
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
Affected
8 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | rustc | < rustc 1.53.0+dfsg1-1 (bookworm) | rustc 1.53.0+dfsg1-1 (bookworm) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cm1_rust_1.59.0-1_on_cbl_mariner_1.0 | — | — |
| rust-lang | rust | >= 1.48.0 < 1.52.0 | 1.52.0 |
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_msrc9.8CRITICAL
vendor_redhat9.8CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Microsoft
In the standard library in Rust before 1.52.0 a double free can occur in the Vec::from_iter function if freeing the element panics.
vendor_msrc·2021-04-13·CVSS 9.8
CVE-2021-31162 [CRITICAL] CWE-415 In the standard library in Rust before 1.52.0 a double free can occur in the Vec::from_iter function if freeing the element panics.
In the standard library in Rust before 1.52.0 a double free can occur in the Vec::from_iter function if freeing the element panics.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
mitre: mitre
Customer Actio
Red Hat
rust: double free in Vec::from_iter function if freeing the element panics
vendor_redhat·2021-03-28·CVSS 9.8
CVE-2021-31162 [CRITICAL] CWE-416 rust: double free in Vec::from_iter function if freeing the element panics
rust: double free in Vec::from_iter function if freeing the element panics
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
Package: rust (Red Hat Enterprise Linux 9) - Not affected
Debian
CVE-2021-31162: rustc - In the standard library in Rust before 1.52.0, a double free can occur in the Ve...
vendor_debian·2021·CVSS 9.8
CVE-2021-31162 [CRITICAL] CVE-2021-31162: rustc - In the standard library in Rust before 1.52.0, a double free can occur in the Ve...
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
Scope: local
bookworm: resolved (fixed in 1.53.0+dfsg1-1)
bullseye: open
forky: resolved (fixed in 1.53.0+dfsg1-1)
sid: resolved (fixed in 1.53.0+dfsg1-1)
trixie: resolved (fixed in 1.53.0+dfsg1-1)
GHSA
GHSA-fjcw-72x2-rmmv: In the standard library in Rust before 1
ghsa_unreviewed·2022-05-24
CVE-2021-31162 [CRITICAL] CWE-415 GHSA-fjcw-72x2-rmmv: In the standard library in Rust before 1
In the standard library in Rust before 1.53.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
OSV
CVE-2021-31162: In the standard library in Rust before 1
osv·2021-04-14·CVSS 9.8
CVE-2021-31162 [CRITICAL] CVE-2021-31162: In the standard library in Rust before 1
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/rust-lang/rust/issues/83618https://github.com/rust-lang/rust/pull/83629https://github.com/rust-lang/rust/pull/84603https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/https://security.gentoo.org/glsa/202210-09https://github.com/rust-lang/rust/issues/83618https://github.com/rust-lang/rust/pull/83629https://github.com/rust-lang/rust/pull/84603https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/https://security.gentoo.org/glsa/202210-09
2021-04-14
Published