GHSA-jmwx-r3gq-qq3p: Vec const Vec-const Attempts To Construct A Vulnerability
MODERATEGHSA-jmwx-r3gq-qq3p is a MODERATE vec-const attempts to construct a vulnerability (General Security Weakness) affecting Vec const libraries in the crates.io ecosystem. The issue involves vec-const attempts to construct a vec from a pointer to a const slice. Remediation is available by upgrading affected packages to version 2.0.0.
GHSA-jmwx-r3gq-qq3p at a Glance
How to Fix GHSA-jmwx-r3gq-qq3p
To remediate this vulnerability, upgrade all affected Vec const 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 vec-const to 2.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for vec-const
How to Check if You Are Affected
To determine whether your application is affected by GHSA-jmwx-r3gq-qq3p, inspect your project dependencies for Vec const:
inspect dependencies for vec-const
Analyze the terminal output to locate any version of Vec const in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.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 Vec const, 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-jmwx-r3gq-qq3p Affected Vec const Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vec-const
|
crates.io |
< 2.0.0
|
2.0.0
|
References
Frequently Asked Questions
What is GHSA-jmwx-r3gq-qq3p?
Which Vec const versions are affected?
What version fixes GHSA-jmwx-r3gq-qq3p?
Is vec-const affected?
What CWE is associated with GHSA-jmwx-r3gq-qq3p?
How can I check crates.io dependencies for GHSA-jmwx-r3gq-qq3p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jmwx-r3gq-qq3p",
"modified" : "2022-06-17T00:27:57Z",
"published" : "2022-06-17T00:27:57Z",
"aliases" : [ ],
"summary" : "vec-const attempts to construct a Vec from a pointer to a const slice",
"details" : "Affected versions of this crate claimed to construct a const `Vec` with nonzero length and capacity, but that cannot be done because such a `Vec` requires a pointer from an allocator.\n\nThe implementation was later changed to just construct a `std::borrow::Cow`.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "vec-const"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Eolu/vec-const/issues/1#issuecomment-898908241"
}, {
"type" : "WEB",
"url" : "https://github.com/Eolu/vec-const"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0082.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:27:57Z",
"nvd_published_at" : null
}
}