Vulnerability DatabaseGHSA-rjhf-4mh8-9xjq

GHSA-rjhf-4mh8-9xjq
Rust vulnerability analysis and mitigation

Overview

The zerocopy crate contains a vulnerability (GHSA-rjhf-4mh8-9xjq) where certain Ref methods (into_ref, into_mut, into_slice, and into_slice_mut) are unsound when used with specific type parameters. The vulnerability affects multiple versions of the crate (>= 0.2.2, < 0.2.9; >= 0.3.0, < 0.3.2; >= 0.4.0, < 0.4.1; >= 0.5.0, < 0.5.2; >= 0.6.0, < 0.6.6; >= 0.7.0, < 0.7.31) and was discovered and disclosed in December 2023 (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability occurs when Ref methods are used with B type parameters set to cell::Ref or cell::RefMut. The issue stems from insufficient lifetime guarantees where B: 'a only requires that the underlying RefCell lives for at least 'a, but the CoreRef itself may be dropped sooner and still satisfy CoreRef<[u8]>: 'a. This can lead to undefined behavior in safe code, as demonstrated by Miri analysis (GitHub Issue).

Impact

When exploited, this vulnerability can lead to undefined behavior in completely safe code. The impact is particularly concerning when using Ref type with B = CoreRef<[u8]> or B = CoreRefMut<[u8]> in combination with the affected methods. However, the real-world impact may be limited as these specific combinations are reportedly rarely used in practice (GitHub Issue).

Mitigation and workarounds

The issue has been fixed in multiple version releases: 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, and 0.7.31. The fix implements a post-monomorphization check that causes code which exercises this undefined behavior to fail compilation. Users should upgrade to the patched versions appropriate for their version train (GitHub Advisory).

Community reactions

The discovery led to discussions about yanking policy within the project, with some users expressing concerns about the impact of yanking on downstream consumers. The project maintainers implemented a policy to yank affected versions after publishing fixes to each affected minor version (GitHub Issue).

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-22698HIGH8.7
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22700HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22699HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22705MEDIUM6.4
  • RustRust
  • ml-dsa
NoYesJan 10, 2026
CVE-2025-15504MEDIUM4.8
  • PythonPython
  • lief
NoYesJan 10, 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