GHSA-f2wx-xjfw-xjv6: Topgrade Topgrade Time-of-check Time-of-use (TOCTOU) Race Vulnerability
LOWGHSA-f2wx-xjfw-xjv6 is a LOW topgrade time-of-check time-of-use (toctou) race vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Topgrade libraries in the crates.io ecosystem. The issue involves topgrade time-of-check time-of-use (toctou) race condition in remove_dir_all. Remediation is available by upgrading affected packages to version 12.0.1.
GHSA-f2wx-xjfw-xjv6 at a Glance
How to Fix GHSA-f2wx-xjfw-xjv6
To remediate this vulnerability, upgrade all affected Topgrade 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 topgrade to 12.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for topgrade
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f2wx-xjfw-xjv6, inspect your project dependencies for Topgrade:
inspect dependencies for topgrade
Analyze the terminal output to locate any version of Topgrade in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.0.1), 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-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Topgrade, 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-f2wx-xjfw-xjv6 Affected Topgrade Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
topgrade
|
crates.io |
< 12.0.1
|
12.0.1
|
References
Frequently Asked Questions
What is GHSA-f2wx-xjfw-xjv6?
Which Topgrade versions are affected?
What version fixes GHSA-f2wx-xjfw-xjv6?
Is topgrade affected?
What CWE is associated with GHSA-f2wx-xjfw-xjv6?
How can I check crates.io dependencies for GHSA-f2wx-xjfw-xjv6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f2wx-xjfw-xjv6",
"modified" : "2023-07-17T18:21:58Z",
"published" : "2023-07-17T18:21:58Z",
"aliases" : [ ],
"summary" : "topgrade Time-of-check Time-of-use (TOCTOU) Race Condition in remove_dir_all",
"details" : "### Summary\nhttps://github.com/advisories/GHSA-mc8h-8q98-g5hr\nhttps://github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead\n\n`tempfile` v0.4.26 ships with affected `remove_dir_all` v0.5.3 and so blocks my deployment of v12 to openSUSE distribution because it imposes a clean `cargo audit`\n\nUpdating `tempfile` is warranted",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "topgrade"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.0.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 12.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/topgrade-rs/topgrade/security/advisories/GHSA-f2wx-xjfw-xjv6"
}, {
"type" : "WEB",
"url" : "https://github.com/XAMPPRocky/remove_dir_all/commit/7247a8b6ee59fc99bbb69ca6b3ca4bfd8c809ead"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-mc8h-8q98-g5hr"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/topgrade-rs/topgrade"
}, {
"type" : "WEB",
"url" : "https://github.com/topgrade-rs/topgrade/releases/tag/v12.0.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-17T18:21:58Z",
"nvd_published_at" : null
}
}