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.
CVE-2021-31162
Score 9.8 from GitHub Security Advisory (severity: CRITICAL) published 2022-05-24. NVD baseline CVSS 9.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 9.8
- EG Score
- 9.8(medium)
- EG Risk
- 50(Track)EG Risk 50/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity98% × 45%Exploitation3% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 3%
- EPSS %ILE
- 86%
- KEV
- Not listed
Published
April 14, 2021
Last Modified
November 21, 2024
Advisory Details (7)
Auto-updated Sep 19, 2026[beta] backports
Fix merged in rust-lang/rust PR #84603 on 2021-04-27 — awaiting tagged release
https://github.com/rust-lang/rust/pull/84603Fix double-drop in `Vec::from_iter(vec.into_iter())` specialization when items drop during panic
Upstream fix in progress (PR #83629 · rust-lang/rust, state=closed)
https://github.com/rust-lang/rust/pull/83629Double free in Vec::from_iter specialization when drop panics · Issue #83618 · rust-lang/rust · GitHub
https://github.com/rust-lang/rust/issues/83618Rust: Multiple Vulnerabilities (GLSA 202210-09) — Gentoo security
https://security.gentoo.org/glsa/202210-09[SECURITY] Fedora 33 Update: rust-1.51.0-3.fc33 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/[SECURITY] Fedora 32 Update: rust-1.51.0-3.fc32 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/[SECURITY] Fedora 34 Update: rust-1.51.0-3.fc34 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/Vendor Advisories for CVE-2021-31162(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(2)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| redhat | rust-toolset-1.52-rust-0:1.52.1-2.el7_9 | 2021-08-10 | redhat |
| redhat | rust-toolset:rhel8-8040020210603202531.2daa1a95 | 2021-08-10 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(10 across 10 ecosystems)
Alpine:v3.19(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Alpine:v3.20(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Alpine:v3.21(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Alpine:v3.22(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Alpine:v3.23(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Alpine:v3.24(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rust | — | 1.51.0-r2 | — |
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rustc | 1.48.0+dfsg1-2 ... 1.96.0+dfsg1-1~exp1 (200 versions) | — | — |
Debian:12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rustc | — | 1.53.0+dfsg1-1 | — |
Debian:13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rustc | — | 1.53.0+dfsg1-1 | — |
Debian:14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| rustc | — | 1.53.0+dfsg1-1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(2)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 8× in last 7d / 32× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 162 total refreshes for this CVE.
- 2026-09-19 15:37 UTCEPSS rescore
- 2026-09-18 19:23 UTCEPSS rescore
- 2026-09-17 19:23 UTCEPSS rescore
- 2026-09-17 19:23 UTCEPSS rescore
- 2026-09-16 14:05 UTCEPSS rescore
- 2026-09-15 03:06 UTCEPSS rescore
- 2026-09-15 03:06 UTCEPSS rescore
- 2026-09-13 16:43 UTCEPSS rescore
- 2026-09-12 14:57 UTCEPSS rescore
- 2026-09-11 14:49 UTCEPSS rescore
- 2026-09-11 09:33 UTCEPSS rescore
- 2026-09-08 21:56 UTCEPSS rescore
- 2026-09-07 15:58 UTCEPSS rescore
- 2026-09-06 18:43 UTCOSV refresh
- 2026-09-06 13:44 UTCEPSS rescore
- 2026-09-05 15:25 UTCEPSS rescore
- 2026-09-04 13:57 UTCEPSS rescore
- 2026-09-04 05:03 UTCEPSS rescore
- 2026-09-04 05:03 UTCEPSS rescore
- 2026-09-02 14:08 UTCEPSS rescore
- 2026-09-01 13:50 UTCEPSS rescore
- 2026-09-01 03:32 UTCEPSS rescore
- 2026-08-30 19:14 UTCEPSS rescore
- 2026-08-30 01:19 UTCEPSS rescore
- 2026-08-28 21:37 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-08-27 14:22 UTCEPSS rescore
- 2026-08-26 14:42 UTCEPSS rescore
- 2026-08-25 13:45 UTCEPSS rescore
- 2026-08-24 14:12 UTCEPSS rescore
- 2026-08-23 00:16 UTCEPSS rescore
- 2026-08-21 23:46 UTCEPSS rescore
- 2026-08-20 22:52 UTCEPSS rescore
- 2026-08-20 05:04 UTCOSV refresh
- 2026-08-19 17:01 UTCEPSS rescore
- 2026-08-18 13:45 UTCEPSS rescore
- 2026-08-17 13:44 UTCEPSS rescore
- 2026-08-16 14:53 UTCEPSS rescore
- 2026-08-16 02:11 UTCEPSS rescore
- 2026-08-16 02:11 UTCEPSS rescore
- 2026-08-15 01:27 UTCEPSS rescore
- 2026-08-13 21:57 UTCEPSS rescore
- 2026-08-12 13:47 UTCEPSS rescore
- 2026-08-11 13:38 UTCEPSS rescore
- 2026-08-08 16:33 UTCEPSS rescore
- 2026-08-07 16:23 UTCEPSS rescore
- 2026-08-06 13:43 UTCEPSS rescore
- 2026-08-05 19:14 UTCEPSS rescore
- 2026-08-05 00:10 UTCOSV refresh
- 2026-08-04 15:06 UTCEPSS rescore
- 2026-08-04 10:34 UTCEPSS rescore
- 2026-08-03 10:33 UTCEPSS rescore
- 2026-08-02 02:24 UTCEPSS rescore
- 2026-08-01 04:13 UTCEPSS rescore
- 2026-07-30 16:25 UTCEPSS rescore
- 2026-07-30 16:25 UTCEPSS rescore
- 2026-07-30 01:28 UTCEPSS rescore
- 2026-07-30 01:27 UTCEPSS rescore
- 2026-07-28 15:33 UTCEPSS rescore
- 2026-07-26 14:52 UTCEPSS rescore
- 2026-07-26 14:52 UTCEPSS rescore
- 2026-07-25 14:15 UTCEPSS rescore
- 2026-07-24 14:15 UTCEPSS rescore
- 2026-07-23 14:16 UTCEPSS rescore
- 2026-07-23 02:00 UTCEG score recompute
- 2026-07-22 22:47 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 22:29 UTCOSV refresh
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:43 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-02 16:57 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-07-01 05:18 UTCOSV refresh
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
- CVE-2001-0825EG 10.0HIGH
- CVE-2001-0554EG 10.0EPSS p99HIGH
- CVE-2001-0414EG 10.0EPSS p100HIGH
- CVE-2001-0191EG 10.0EPSS p92HIGH
- CVE-2001-0301EG 10.0EPSS p91HIGH
- CVE-2001-0197EG 10.0EPSS p96HIGH
- CVE-2001-0233EG 10.0EPSS p96HIGH
- CVE-2001-0010EG 10.0EPSS p98HIGH
- CVE-2001-0011EG 10.0EPSS p94HIGH
- CVE-2001-0013EG 10.0EPSS p96HIGH
Same CWE
10 shownCWE-415
- CVE-2007-4773EG 9.8CRITICAL
- CVE-2016-8619NVD 5.3EG 9.8EPSS p92CRITICAL
- CVE-2016-8618NVD 5.3EG 9.8EPSS p92CRITICAL
- CVE-2015-9165EG 9.8CRITICAL
- CVE-2017-18201EG 9.8CRITICAL
- CVE-2017-18174EG 9.8CRITICAL
- CVE-2017-1000232EG 9.8CRITICAL
- CVE-2017-1000231EG 9.8CRITICAL
- CVE-2017-16820EG 9.8EPSS p90CRITICAL
- CVE-2017-14952EG 9.8EPSS p92CRITICAL
Frequently asked(5)
What is CVE-2021-31162?
When was CVE-2021-31162 disclosed?
Is CVE-2021-31162 actively exploited?
What is the CVSS score of CVE-2021-31162?
How do I remediate CVE-2021-31162?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-31162
Is Your Infrastructure Affected by CVE-2021-31162?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.