CVE-2022-21658
Race condition in std::fs::remove_dir_all in rustlang
02 Description
Race condition in std::fs::remove_dir_all in rustlang
03 Exploitation and scoring
- Exploitation
- Public exploit code exists. CISA's assessment records a public proof of concept. That is not a report of exploitation in the wild.
- SSVC decision
- ExploitationpocPublic proof-of-concept exploit code exists. Not a report of exploitation in the wild.
- AutomatablenoAt least one step from reconnaissance to exploitation cannot be reliably automated.
- Technical ImpactpartialSuccessful exploitation gives limited control of the vulnerable component.
- EPSS probability
- 1.37% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 71.8% of scored records. A rank, not a probability.
- NVD base score
- 6.3 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-06-17.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2022-01-20 00:00Z4 YR AGO
- Last updated
- 2025-04-22 18:32Z1 YR AGO
- Reserved
- 2021-11-16
- Assigning CNA
- GitHub_M
- Record state
- PUBLISHED
- Severity
- High (CVSS 7.3)
- CNA CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H
- Weaknesses
- Data version
- 5.1
- Document digest
- 35e1682c1d662b9f515fb46b75c9db871a2661e6ac51ceb873b145e247ecbe29
05 Affected products
06 References
- github.comhttps://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2
- github.comhttps://github.com/rust-lang/rust/pull/93110
- github.comhttps://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946
- github.comhttps://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf
- github.comhttps://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714
- blog.rust-lang.orghttps://blog.rust-lang.org/2022/01/20/cve-2022-21658.html
- lists.fedoraproject.orgFEDORA-2022-1bafa3fc91https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/
- lists.fedoraproject.orgFEDORA-2022-2c73789458https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/
- lists.fedoraproject.orgFEDORA-2022-1b76e3a192https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/
- lists.fedoraproject.orgFEDORA-2022-06569a0a60https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/
- support.apple.comhttps://support.apple.com/kb/HT213183
- support.apple.comhttps://support.apple.com/kb/HT213182
- support.apple.comhttps://support.apple.com/kb/HT213186
- support.apple.comhttps://support.apple.com/kb/HT213193
- security.gentoo.orgGLSA-202210-09https://security.gentoo.org/glsa/202210-09
07 Fixed in
AlmaLinux 8
- cargo Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- cargo-doc Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- clippy Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rls Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-analysis Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-debugger-common Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-doc Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-gdb Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-lldb Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-src Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static-wasm32-unknown-unknown Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static-wasm32-wasi Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-toolset Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rustfmt Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
CloudLinux 8
- cargo Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- cargo-doc Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- clippy Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rls Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-analysis Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-debugger-common Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-doc Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-gdb Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-lldb Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-src Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static-wasm32-unknown-unknown Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-std-static-wasm32-wasi Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rust-toolset Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
- rustfmt Fixed in 1.58.1-1.module_el8.6.0+2748+176088b3
Derived from AlmaLinux 8. Partial coverage: only packages taken from AlmaLinux 8 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Debian 12
- rustc Fixed in 1.57.0+dfsg1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 13
- rustc Fixed in 1.57.0+dfsg1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 14
- rustc Fixed in 1.57.0+dfsg1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- rustc Fixed in 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 14.04 LTS
- rustc No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 16.04 LTS
- rustc No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.