GHSA-ghc8-5cgm-5rpf: Inventory Inventory Fails To Prohibit Standard Vulnerability
MODERATEGHSA-ghc8-5cgm-5rpf is a MODERATE inventory fails to prohibit standard vulnerability (General Security Weakness) affecting Inventory libraries in the crates.io ecosystem. The issue involves inventory fails to prohibit standard library access prior to initialization of rust standard library runtime. Remediation is available by upgrading affected packages to version 0.2.0.
GHSA-ghc8-5cgm-5rpf at a Glance
How to Fix GHSA-ghc8-5cgm-5rpf
To remediate this vulnerability, upgrade all affected Inventory 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 inventory to 0.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for inventory
How to Check if You Are Affected
To determine whether your application is affected by GHSA-ghc8-5cgm-5rpf, inspect your project dependencies for Inventory:
inspect dependencies for inventory
Analyze the terminal output to locate any version of Inventory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.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 General Security Weakness. In Inventory, 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-ghc8-5cgm-5rpf Affected Inventory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
inventory
|
crates.io |
< 0.2.0
|
0.2.0
|
References
Frequently Asked Questions
What is GHSA-ghc8-5cgm-5rpf?
Which Inventory versions are affected?
What version fixes GHSA-ghc8-5cgm-5rpf?
Is inventory affected?
What CWE is associated with GHSA-ghc8-5cgm-5rpf?
How can I check crates.io dependencies for GHSA-ghc8-5cgm-5rpf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ghc8-5cgm-5rpf",
"modified" : "2023-09-11T20:43:17Z",
"published" : "2023-09-11T20:43:17Z",
"aliases" : [ ],
"summary" : "Inventory fails to prohibit standard library access prior to initialization of Rust standard library runtime",
"details" : "Affected versions allow arbitrary caller-provided code to execute before the lifetime of `main`.\n\nIf the caller-provided code accesses particular pieces of the standard library that require an initialized Rust runtime, such as `std::io` or `std::thread`, these may not behave as documented. Panics are likely; UB is possible.\n\nThe flaw was corrected by enforcing that only code written within the `inventory` crate, which is guaranteed not to access runtime-dependent parts of the standard library, runs before `main`. Caller-provided code is restricted to running at compile time.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "inventory"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/dtolnay/inventory/pull/43"
}, {
"type" : "WEB",
"url" : "https://github.com/dtolnay/inventory/commit/b853350a3800e38d2cb9950355b80bc8b8d3959c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dtolnay/inventory"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0057.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-11T20:43:17Z",
"nvd_published_at" : null
}
}