Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io

GHSA-3mv5-343c-w2qg

Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut

Also known asGHSA-rjhf-4mh8-9xjqRUSTSEC-2023-0074
Published
Dec 15, 2023
Updated
Feb 12, 2024
Affected
6 pkgs
Patched
6 / 6
Exploits
None indexed

Blast Radius

6 pkgs affected
🦀zerocopy🦀zerocopy🦀zerocopy🦀zerocopy🦀zerocopy🦀zerocopy

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

This advisory is also published as RUSTSEC-2023-0074.

The Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound and may allow safe code to exhibit undefined behavior when used with Ref<B, T> where B is cell::Ref or cell::RefMut. Note that these methods remain sound when used with B types other than cell::Ref or cell::RefMut.

See https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.

The current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.

Affected Packages

6 total 6 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iozerocopy0.2.2&&< 0.2.90.2.9
🦀crates.iozerocopy0.3.0&&< 0.3.20.3.2
🦀crates.iozerocopy0.4.0&&< 0.4.10.4.1
🦀crates.iozerocopy0.5.0&&< 0.5.20.5.2
🦀crates.iozerocopy0.6.0&&< 0.6.60.6.6
🦀crates.iozerocopy0.7.0&&< 0.7.310.7.31

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for zerocopy. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update zerocopy to 0.2.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-3mv5-343c-w2qg is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-3mv5-343c-w2qg is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-3mv5-343c-w2qg. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).* The `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref<B, T>` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`. See https://github.com/google/zerocopy/issues/716 for
O3 Security · Impact-Aware SCA

Is GHSA-3mv5-343c-w2qg in your dependencies?

O3 detects GHSA-3mv5-343c-w2qg across crates.io dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.