Vulnerability DatabaseGHSA-3mv5-343c-w2qg

GHSA-3mv5-343c-w2qg
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-3mv5-343c-w2qg) affects the zerocopy Rust crate, specifically concerning the Ref methods into_ref, into_mut, into_slice, and into_slice_mut which are found to be unsound when used with cell::Ref or cell::RefMut. The issue was discovered and disclosed in December 2023, affecting multiple versions ranging from 0.2.2 through 0.7.30. The vulnerability has been patched in versions 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, and 0.7.31 (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from insufficient guarantees in the implementation of Ref methods. While the code requires the buffer type B to satisfy lifetime 'a (B: 'a), this proves inadequate when B is cell::Ref or cell::RefMut. The issue arises because CoreRef<[u8]>: 'a only requires the underlying RefCell to live for lifetime 'a, while the CoreRef itself may be dropped sooner. This creates a situation where the underlying memory can be mutated after the CoreRef is dropped, leading to undefined behavior (Google Issue).

Impact

The vulnerability allows safe code to exhibit undefined behavior when using specific Ref methods with cell::Ref or cell::RefMut. While the actual impact in production environments may be limited due to the specific conditions required to trigger the vulnerability, any code using these methods with the affected types could potentially experience memory safety issues (GitHub Advisory).

Mitigation and workarounds

The issue has been fixed through a post-monomorphization check that causes code which would exhibit this undefined behavior to fail during compilation. The fix has been backported to all affected versions, resulting in new releases: 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, and 0.7.31. Users are advised to upgrade to these patched versions (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22863CRITICAL9.2
  • RustRust
  • deno
NoYesJan 15, 2026
CVE-2026-23519HIGH8.9
  • RustRust
  • yazi
NoYesJan 15, 2026
RUSTSEC-2026-0003HIGH8.9
  • RustRust
  • cmov
NoYesJan 14, 2026
CVE-2026-22864HIGH8.1
  • RustRust
  • deno
NoYesJan 15, 2026
CVE-2026-22782LOW2.9
  • RustRust
  • rustfs
NoYesJan 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management