RUSTSEC-2023-0018
LOWRace Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU) Race Condition in remove_dir_all
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.
- Published
- 24 Feb 2023
- Last modified
- 9 Nov 2026
- Weakness
- CWE-366CWE-367
- Also known as
- GHSA-mc8h-8q98-g5hr
- Sources
- OSV GHSA-mc8h-8q98-g5hrJSONOSVJSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | remove_dir_all | < 0.8.0 | 0.8.0 |
| OSV | crates.io | remove_dir_all | >= 0.0.0-0, < 0.8.0 | 0.8.0 |
References
- https://github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr · WEB
- https://github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead · WEB
- https://github.com/XAMPPRocky/remove_dir_all · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2023-0018.html · WEB, ADVISORY
- https://crates.io/crates/remove_dir_all · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Feb 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Feb 2023)