Predictive Vulnerability Intelligence.

Product

  • Product
  • Pricing
  • Documentation

Company

  • About
  • Partnerships
  • Blog
  • Support

Legal

  • Terms
  • Privacy
  • Data Licensing

© 2026 FAUCET Technologies LLC. All rights reserved.

CVE-2022-21658

23
FAUCET Score

CVE-2022-21658 is a race condition vulnerability in the std::fs::remove_dir_all function of the Rust standard library, affecting Rust versions 1.0.0 through 1.58.0. This flaw allows an attacker to trick privileged programs into deleting files or directories they shouldn't have access to, impacting products like Rust-lang, Apple, and Fedora Project. Rated Medium severity (CVSS 6.3), it requires local access and high attack complexity, with successful exploitation leading to high integrity and availability impacts. While there is no evidence of active exploitation or public exploit code (Metasploit, Nuclei, ExploitDB), it has garnered community discussion and media coverage, indicating awareness.

Impacted Technologies

VendorProductVersion(s)CPE
>= 1.0.0, <= 1.58.0CPE matchmatch criteria
cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*
34CPE matchmatch criteria
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
35CPE matchmatch criteria
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
< 15.4CPE matchmatch criteria
cpe:2.3:o:apple:ipados:*:*:*:*:*:*:*:*
< 15.4CPE matchmatch criteria
cpe:2.3:o:apple:iphone_os:*:*:*:*:*:*:*:*

CVSS Data

CVSS version used by this source: 3.1

7.3HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H

Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
CHANGED
Confidentiality Impact
NONE
Integrity Impact
LOW
Availability Impact
HIGH
Exploitability Score
2.0
Impact Score
4.7
CvssVersion
3.1

Exploit Intelligence

EPSS Score
1.38%
Probability of exploitation in next 30 days
EPSS Percentile
69.2%
Percentile rank of EPSS score among Peer Group
As of 2026-07-27
Model: v2026.06.15
This CVE's current EPSS score of 0.0138 is in the 92nd percentile among its peer group of 1,297 CVEs.

Social Chatter

The average CVE in this peer group has 0.0 Twitter, 0.1 Reddit, 0.1 Bluesky, 0.0 Mastodon, and 0.1 GitHub mentions.

Media Mentions

The average CVE in this peer group has 0.4 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.

Remediation

Patch Available

Vendor Patches (8)

github_advisorypatch availablevia nvd_reference
View patch
microsoftpatch availablevia msrc
Product: 17941-16820Fixed in: 1.59.0-1
microsoftpatch availablevia msrc
Product: 18801-16823Fixed in: 1.59.0-1
microsoftpatch availablevia msrc
Product: cbl2 rust 1.59.0-1 on CBL Mariner 2.0Fixed in: 1.59.0-1
microsoftpatch availablevia msrc
Product: cm1 rust 1.59.0-1 on CBL Mariner 1.0Fixed in: 1.59.0-1
redhatpatch availablevia redhat_api
Product: Red Hat Enterprise Linux 8Fixed in: rust-toolset:rhel8-8060020220125235043.eab6f2ea
View patch
redhatend of lifevia redhat_api
Product: Red Hat Enterprise Linux 9Fixed in: stratisd
redhatend of lifevia redhat_api
Product: Red Hat Enterprise Linux 8Fixed in: stratisd

Vendor Advisories (2)

redhatCVE-2022-21658Moderate

rust: Race condition in remove_dir_all leading to removal of files outside of the directory being removed

Jan 20, 2022
microsoft2022-Jan/CVE-2022-21658Moderate

Race condition in std::fs::remove_dir_all in rustlang

Jan 11, 2022

References

blog.rust-lang.org / 2022/01/20/cve-2022-21658.html
ExploitMitigationVendor Advisory
github.com / rust-lang/rust/pull/93110
PatchThird Party Advisory
github.com / rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946
PatchThird Party Advisory
github.com / rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf
PatchThird Party Advisory
github.com / rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714
PatchThird Party Advisory
github.com / rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2
ExploitMitigationThird Party Advisory
lists.fedoraproject.org / archives/list/package-announce%40lists.fedoraproject.org/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW
lists.fedoraproject.org / archives/list/package-announce%40lists.fedoraproject.org/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX
lists.fedoraproject.org / archives/list/package-announce%40lists.fedoraproject.org/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ
lists.fedoraproject.org / archives/list/package-announce%40lists.fedoraproject.org/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N
security.gentoo.org / glsa/202210-09
Third Party Advisory
support.apple.com / kb/HT213182
Third Party Advisory
support.apple.com / kb/HT213183
Third Party Advisory
support.apple.com / kb/HT213186
Third Party Advisory
support.apple.com / kb/HT213193
Third Party Advisory