GHSA-xrrq-rrgq-h89w Uninitialized read after allocating MemBump

Not scored Published

An uninitialized memory read in MemBump allocation can cause assertion failures and denial of service in Rust applications using this library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-xrrq-rrgq-h89w?

GHSA-xrrq-rrgq-h89w is a memory corruption vulnerability in static-alloc, published on 11 Jul 2025.

Official description

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 is undefined 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 to cause 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.

Which versions are affected by GHSA-xrrq-rrgq-h89w?

3 open source packages ship an affected version, including static-alloc.

PackageAffectedFixed in
static-alloc crates.ioFrom 0.2.20.2.6
static-alloc crates.ioFrom 0.2.20.2.6
static-alloc crates.ioFrom 0.2.2-00.2.6

How do I fix GHSA-xrrq-rrgq-h89w?

Upgrade static-alloc to 0.2.6 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-xrrq-rrgq-h89w being exploited?

There is no known exploitation of GHSA-xrrq-rrgq-h89w in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2025-0042.

Is GHSA-xrrq-rrgq-h89w in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free