# 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 (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-02-24T12:00:00.000Z
- Modified: 2026-11-09T11:00:03.760Z
- Also known as: RUSTSEC-2023-0018
- Weaknesses: CWE-366, CWE-367

## 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.

(As written by GitHub Advisory Database.)

## Affected

- remove_dir_all (crates.io): before 0.8.0; from 0.0.0-0 before 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> (advisory, web)
- <https://crates.io/crates/remove_dir_all> (package)

## Sources

- GitHub Advisory Database: [GHSA-mc8h-8q98-g5hr](https://github.com/advisories/GHSA-mc8h-8q98-g5hr), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2023-0018](https://rustsec.org/advisories/RUSTSEC-2023-0018.html), CC0-1.0, modified 2026-11-09

---

Page: https://cve.day/GHSA-mc8h-8q98-g5hr · Whole record: https://cve.day/GHSA-mc8h-8q98-g5hr.json · Rebuilt by cve.day 2026-11-25T22:56:43.141Z
