RUSTSEC-2026-0306
Vulnerability from osv_rustsec – Published: 2026-09-20 12:00 – Updated: 2026-09-23 14:07 – Source websitefaster_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.
{
"affected": [
{
"database_specific": {
"categories": [
"memory-corruption"
],
"cvss": null,
"informational": "unsound"
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [
"x86",
"x86_64"
],
"functions": [
"faster_hex::hex_decode_unchecked"
],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "faster-hex",
"purl": "pkg:cargo/faster-hex"
},
"ranges": [
{
"events": [
{
"introduced": "0.3.0"
},
{
"fixed": "0.10.1"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [],
"database_specific": {
"license": "CC0-1.0"
},
"details": "`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() \u003e= 32` and then loads 32 bytes from `src` and 32 bytes from `src[32..]`. Nothing in that loop requires `src` to contain 64 bytes.\n\nA safe caller can pass a short `src` and a `dst` of at least 32 bytes. The AVX2 load then reads outside `src`.\n\nThe 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() \u003e= 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 `\u003e= 0.10.1`. Other architectures take the scalar fallback and are outside this advisory.",
"id": "RUSTSEC-2026-0306",
"modified": "2026-09-23T14:07:49Z",
"published": "2026-09-20T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/faster-hex"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2026-0306.html"
},
{
"type": "REPORT",
"url": "https://github.com/nervosnetwork/faster-hex/issues/73"
},
{
"type": "WEB",
"url": "https://github.com/nervosnetwork/faster-hex/pull/72"
},
{
"type": "WEB",
"url": "https://github.com/nervosnetwork/faster-hex/pull/74"
}
],
"related": [],
"severity": [],
"summary": "`hex_decode_unchecked` AVX2 path reads past `src`"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.