Email me

Rust advisories / zerocopy

Vulnerability LowRUSTSEC-2023-0074 · zerocopy

RUSTSEC-2023-0074: Some Ref methods are unsound with some type parameters

Short answerA security vulnerability in the zerocopy crate: Some Ref methods are unsound with some type parameters. GitHub rates it Low. Fixed in 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31: update to a fixed version.

Cratezerocopy
TypeVulnerability
Affected versionsFrom 0.2.2 before 0.2.9; from 0.3.0 before 0.3.2; from 0.4.0 before 0.4.1; from 0.5.0 before 0.5.2; from 0.6.0 before 0.6.6; from 0.7.0 before 0.7.31.
Fixed in0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31
SeverityLow (GitHub rating)
Published2023-12-14
Last changed2024-02-10
Also known asGHSA-3mv5-343c-w2qg, GHSA-rjhf-4mh8-9xjq
Affected functionszerocopy::Ref::into_mut, zerocopy::Ref::into_mut_slice, zerocopy::Ref::into_ref, zerocopy::Ref::into_slice

What to do

  1. See which version you have: cargo tree -i zerocopy (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p zerocopy. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example zerocopy = "0.7.31") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

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.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Same cratezerocopy: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ