GHSA-xrrq-rrgq-h89w: Static alloc Static-alloc Vulnerability Leads To Uninitialized Vulnerability

LOW
CWE-908
Published
Advisory Summary

GHSA-xrrq-rrgq-h89w is a LOW static-alloc vulnerability leads to uninitialized vulnerability (CWE-908: Use of Uninitialized Resource) affecting Static alloc libraries in the crates.io ecosystem. The issue involves static-alloc vulnerability leads to uninitialized read after allocating membump. Remediation is available by upgrading affected packages to version 0.2.6.

GHSA-xrrq-rrgq-h89w at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-xrrq-rrgq-h89w
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-908: Use of Uninitialized Resource
Affected Product Static alloc
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-xrrq-rrgq-h89w

To remediate this vulnerability, upgrade all affected Static alloc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

static-alloc fixed: 0.2.6
Upgrade static-alloc to 0.2.6
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 static-alloc

How to Check if You Are Affected

To determine whether your application is affected by GHSA-xrrq-rrgq-h89w, inspect your project dependencies for Static alloc:

inspect dependencies for static-alloc

Analyze the terminal output to locate any version of Static alloc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.6), 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-908: Use of Uninitialized Resource, where the product uses or accesses a resource that has not been initialized. In Static alloc, 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

The affected function, `MemBump::new()`, would allocate memory without initializing it. Subsequently calling the created value's various `alloc`methods would then read and write the start of that memory as a `Cell` which isundefined behavior. Instead, it should zero initialize the start of the allocated memory. For instance, some values could violate the internal invariants of the type and cause an assertion failure. Nevertheless, no deterministic read is known tocause further uninitialized memory to be exposed. Affected downstream users that can not upgrade are advised to call `MemBump::reset` immediately after allocation to manually perform the missing write of the counter best-as-possible. The flaw was corrected in commit d8d6a7d096d3aaafd963b356a8f1bbd8d26fd967 by zeroing the Cell at the start of the allocated memory.

GHSA-xrrq-rrgq-h89w Affected Static alloc Versions

1 component(s)
Fixed Versions:
0.2.6
Product / Package Ecosystem Affected Versions Fixed Version
static-alloc
crates.io
≥ 0.2.2
< 0.2.6
0.2.6

References

Frequently Asked Questions

What is GHSA-xrrq-rrgq-h89w?
GHSA-xrrq-rrgq-h89w is a security vulnerability in Static alloc involving static-alloc vulnerability leads to uninitialized read after allocating MemBump under CWE-908: Use of Uninitialized Resource.
Which Static alloc versions are affected?
Affected versions include releases prior to 0.2.6 across affected packages: static-alloc.
What version fixes GHSA-xrrq-rrgq-h89w?
Upgrading to 0.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is static-alloc affected?
Yes, static-alloc is affected in releases prior to 0.2.6. Upgrade your dependency to 0.2.6 or later.
What CWE is associated with GHSA-xrrq-rrgq-h89w?
GHSA-xrrq-rrgq-h89w is classified under CWE-908: Use of Uninitialized Resource (The product uses or accesses a resource that has not been initialized.).
How can I check crates.io dependencies for GHSA-xrrq-rrgq-h89w?
Run the dependency tree command: 'inspect dependencies for static-alloc'. 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-xrrq-rrgq-h89w",
  "modified" : "2025-07-11T19:57:06Z",
  "published" : "2025-07-11T19:57:06Z",
  "aliases" : [ ],
  "summary" : "static-alloc vulnerability leads to uninitialized read after allocating MemBump",
  "details" : "The affected function, `MemBump::new()`, would allocate memory without initializing it. Subsequently calling the created value's various `alloc`methods would then read and write the start of that memory as a `Cell` which isundefined behavior. Instead, it should zero initialize the start of the allocated memory.\n\nFor instance, some values could violate the internal invariants of the type and cause an assertion failure. Nevertheless, no deterministic read is known tocause further uninitialized memory to be exposed.\n\nAffected downstream users that can not upgrade are advised to call `MemBump::reset` immediately after allocation to manually perform the missing write of the counter best-as-possible.\n\nThe flaw was corrected in commit d8d6a7d096d3aaafd963b356a8f1bbd8d26fd967 by zeroing the Cell at the start of the allocated memory.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "static-alloc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.2"
      }, {
        "fixed" : "0.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/197g/static-alloc/issues/81"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/197g/static-alloc/pull/82/commits/d8d6a7d096d3aaafd963b356a8f1bbd8d26fd967"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/197g/static-alloc"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0042.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-908" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-11T19:57:06Z",
    "nvd_published_at" : null
  }
}