# CVE-2021-31162

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-04-14 · Modified: 2024-08-03
- Aliases: ALPINE-CVE-2021-31162, UBUNTU-CVE-2021-31162, DEBIAN-CVE-2021-31162
- Record: https://cvemate.com/vulnerability/CVE-2021-31162 · JSON: https://cvemate.com/vulnerability/CVE-2021-31162/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 2.89%, percentile 87.347%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine chromium-rust (Alpine Linux): \< 1.51.0-r2
- alpine rust (Alpine Linux): ≥ 1.48.0, \< 1.51.0-r2
- debian rustc (Debian): \< 1.53.0+dfsg1-1
- ubuntu rustc (Ubuntu): All versions (No fix recorded) \| \< 1.53.0+dfsg1+llvm-4ubuntu1~20.04.1 \| \< 1.53.0+dfsg1+llvm-4ubuntu1
- fedoraproject fedora: 32 \| 33 \| 34
- rust-lang rust: ≥ 1.48.0, \< 1.52.0

## References

- <https://github.com/rust-lang/rust/issues/83618>
- <https://github.com/rust-lang/rust/pull/83629>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/>
- <https://github.com/rust-lang/rust/pull/84603>
- <https://security.gentoo.org/glsa/202210-09>
- <https://security.alpinelinux.org/vuln/CVE-2021-31162>
- <https://ubuntu.com/security/CVE-2021-31162>
- <https://www.cve.org/CVERecord?id=CVE-2021-31162>
- <https://security-tracker.debian.org/tracker/CVE-2021-31162>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-31162>

---

Data as of 2026-12-05T09:59:54.409Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
