What’s Vulnerable › Vulnerabilities
GHSA-mc8h-8q98-g5hr: Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU) Race Condition in remove_dir_all
- Severity: low (CVSS 3.0)
- Exploited in the wild: not listed in CISA KEV
- Public exploit or detection template: none known
- Published: 2023-02-24 · updated 2026-09-10
- Weakness: CWE-366
Description
The `remove_dir_all` crate is a Rust library that offers additional features over the Rust standard library `fs::remove_dir_all` function. It suffers the same class of failure as the code it was layering over: TOCTOU race conditions, with the ability to cause arbitrary paths to be deleted by substituting a symlink for a path after the type of the path was checked. Thanks to the Rust security team for identifying the problem and alerting us to it.
Affected products
- Crates.Io Remove Dir All: before 0.8.0 — fixed in 0.8.0
How to fix
Upgrade to a fixed version: Crates.Io Remove Dir All 0.8.0. Check the vendor advisory for mitigations.
References
- https://github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr
- https://github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead
- https://github.com/XAMPPRocky/remove_dir_all
- https://rustsec.org/advisories/RUSTSEC-2023-0018.html
Get alerted when GHSA-mc8h-8q98-g5hr or the next vulnerability affects your stack