CVE-2021-31162: In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freei
CVE-2021-31162 is a critical-severity flaw (CVSS 9.8) affecting rust, fedora. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- Public exploit reference
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 2.9% (top 13%) |
| CISA exploited list | No |
| Weakness | CWE-415 |
| Published | 2021-04-14 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-31162?
rust: upgrade to 1.52.0; fedora: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2021-31162 being exploited?
CVE-2021-31162 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-31162 affect?
CVE-2021-31162 affects rust, fedora. Severity is critical (CVSS 9.8). 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.
How urgent is CVE-2021-31162?
Priority 66/100. Critical severity; Public exploit reference; Remotely exploitable, no login, no user action
Related CVEs
- CVE-2024-43402 HIGH 8.1 UPGRADE Rust is a programming language
- CVE-2024-3566 CRITICAL 9.8 UPGRADE UPGRADE A command inject vulnerability allows an attacker to perform command injection on Windows applications that in
- CVE-2024-24576 CRITICAL 10.0 MITIGATE UPGRADE Rust is a programming language
- CVE-2023-40030 MEDIUM 6.1 UPGRADE Cargo downloads a Rust project’s dependencies and compiles the project
- CVE-2022-21658 HIGH 7.3 UPGRADE MITIGATE Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially