GHSA-mc8h-8q98-g5hr: Remove dir all Race Condition Enabling Link Following Vulnerability
LOWGHSA-mc8h-8q98-g5hr is a LOW race condition enabling link following vulnerability (CWE-366: Race Condition within a Thread) affecting Remove dir all libraries in the crates.io ecosystem. The issue involves race condition enabling link following and time-of-check time-of-use (toctou) race condition in remove_dir_all. Remediation is available by upgrading affected packages to version 0.8.0.
GHSA-mc8h-8q98-g5hr at a Glance
How to Fix GHSA-mc8h-8q98-g5hr
To remediate this vulnerability, upgrade all affected Remove dir all dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade remove_dir_all to 0.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for remove_dir_all
How to Check if You Are Affected
To determine whether your application is affected by GHSA-mc8h-8q98-g5hr, inspect your project dependencies for Remove dir all:
inspect dependencies for remove_dir_all
Analyze the terminal output to locate any version of Remove dir all in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-366: Race Condition within a Thread, where if two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined. In Remove dir all, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-mc8h-8q98-g5hr Affected Remove dir all Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
remove_dir_all
|
crates.io |
< 0.8.0
|
0.8.0
|
References
Frequently Asked Questions
What is GHSA-mc8h-8q98-g5hr?
Which Remove dir all versions are affected?
What version fixes GHSA-mc8h-8q98-g5hr?
Is remove_dir_all affected?
What CWE is associated with GHSA-mc8h-8q98-g5hr?
How can I check crates.io dependencies for GHSA-mc8h-8q98-g5hr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mc8h-8q98-g5hr",
"modified" : "2023-02-24T16:23:59Z",
"published" : "2023-02-24T16:23:59Z",
"aliases" : [ ],
"summary" : "Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU) Race Condition in remove_dir_all",
"details" : "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.\n\nThanks to the Rust security team for identifying the problem and alerting us to it.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "remove_dir_all"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr"
}, {
"type" : "WEB",
"url" : "https://github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/XAMPPRocky/remove_dir_all"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0018.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-366", "CWE-367" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-24T16:23:59Z",
"nvd_published_at" : null
}
}