Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. remove_dir_all
  4. ›
  5. GHSA-mc8h-8q98-g5hr

GHSA-mc8h-8q98-g5hr: Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU) Race Condition in remove_dir_all

February 24, 2023

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.

References

  • github.com/XAMPPRocky/remove_dir_all
  • github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead
  • github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr
  • github.com/advisories/GHSA-mc8h-8q98-g5hr
  • rustsec.org/advisories/RUSTSEC-2023-0018.html

Code Behaviors & Features

Detect and mitigate GHSA-mc8h-8q98-g5hr with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.8.0

Fixed versions

  • 0.8.0

Solution

Upgrade to version 0.8.0 or above.

Weakness

  • CWE-366: Race Condition within a Thread
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Source file

cargo/remove_dir_all/GHSA-mc8h-8q98-g5hr.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:34 +0000.