GHSA-xcpm-76hf-c9cc Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice

Not scored Published

A Rust library function exposes uninitialized memory via unsafe slice creation, potentially leading to undefined behavior and information disclosure.

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

What is GHSA-xcpm-76hf-c9cc?

GHSA-xcpm-76hf-c9cc is a memory corruption vulnerability in borrowck_sacrifices, published on 21 Oct 2025.

Official description

The safe function any_as_u8_slice can create byte slices that reference uninitialized memory when used with types containing padding bytes.

The function uses slice::from_raw_parts to create a &[u8] covering the entire size of a type, including padding bytes. According to Rust's documentation, from_raw_parts requires all bytes to be properly initialized, but padding bytes in structs are not guaranteed to be initialized. This violates the safety contract and causes undefined behavior.

Which versions are affected by GHSA-xcpm-76hf-c9cc?

3 open source packages ship an affected version, including borrowck_sacrifices.

PackageAffectedFixed in
borrowck_sacrifices crates.ioAll versions0.2.0
borrowck_sacrifices crates.ioAll versions0.2.0
borrowck_sacrifices crates.ioFrom 0.0.0-00.2.0

How do I fix GHSA-xcpm-76hf-c9cc?

Upgrade borrowck_sacrifices to 0.2.0 or later.

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

Is GHSA-xcpm-76hf-c9cc being exploited?

There is no known exploitation of GHSA-xcpm-76hf-c9cc in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2025-0107.

Is GHSA-xcpm-76hf-c9cc in your software?

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

Check your SBOMs for free