GHSA-jmwx-r3gq-qq3p: Vec const Vec-const Attempts To Construct A Vulnerability

MODERATE
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-jmwx-r3gq-qq3p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Vec const
Package Ecosystem crates.io
Published Date
Last Updated

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.

vec-const fixed: 2.0.0
Upgrade vec-const to 2.0.0
Verify Direct and Transitive Dependencies

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

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. The implementation was later changed to just construct a `std::borrow::Cow`.

GHSA-jmwx-r3gq-qq3p Affected Vec const Versions

1 component(s)
Fixed Versions:
2.0.0
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?
GHSA-jmwx-r3gq-qq3p is a security vulnerability in Vec const involving vec-const attempts to construct a Vec from a pointer to a const slice under General Security Weakness.
Which Vec const versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: vec-const.
What version fixes GHSA-jmwx-r3gq-qq3p?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vec-const affected?
Yes, vec-const is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What CWE is associated with GHSA-jmwx-r3gq-qq3p?
GHSA-jmwx-r3gq-qq3p is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-jmwx-r3gq-qq3p?
Run the dependency tree command: 'inspect dependencies for vec-const'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}