Email me

Rust advisories / faster-hex

UnsoundRUSTSEC-2026-0306 · faster-hex

RUSTSEC-2026-0306: `hex_decode_unchecked` AVX2 path reads past `src`

Short answerfaster-hex has an API that can cause undefined behaviour from safe code: `hex_decode_unchecked` AVX2 path reads past `src`. Fixed in 0.10.1.

Cratefaster-hex
TypeUnsound (memory-corruption)
Affected versionsFrom 0.3.0 before 0.10.1.
Fixed in0.10.1
Severitynot scored
Published2026-09-20
Last changed2026-09-23
Also known asnone
Affected functionsfaster_hex::hex_decode_unchecked

What to do

  1. See which version you have: cargo tree -i faster-hex (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p faster-hex. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example faster-hex = "0.10.1") 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

faster_hex::hex_decode_unchecked is a safe function. On x86 and x86_64, when AVX2 is enabled, hex_decode_avx2 keeps decoding while dst.len() >= 32 and then loads 32 bytes from src and 32 bytes from src[32..]. Nothing in that loop requires src to contain 64 bytes.

A safe caller can pass a short src and a dst of at least 32 bytes. The AVX2 load then reads outside src.

The function has had this shape since 0.3.0. 0.10.0 is the last release with the unbounded AVX2 read. The maintainer agreed to this advisory and shipped the backport in 0.10.1 (pull request 74): the AVX2 loop now requires src.len() >= 64 before those loads. 1.0.0 rewrites hex_decode_unchecked so the decoded length is min(src.len() / 2, dst.len()). Both are covered by >= 0.10.1. Other architectures take the scalar fallback and are outside this advisory.

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

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.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