{"id":"GHSA-74r5-g7vc-j2v2","aliases":["GHSA-74r5-g7vc-j2v2","RUSTSEC-2024-0346"],"related":[],"kind":"vulnerability","state":"published","title":"zerovec-derive incorrectly uses `#[repr(packed)]`","summary":"The affected versions make unsafe memory accesses under the assumption that `#[repr(packed)]` has a guaranteed field order. \n\nThe Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts \nreordering fields of `#[repr(packed)]` structs, leading to illegal memory accesses.\n\nThe patched versions `0.9.7` and `0.10.3` use `#[repr(C, packed)]`, which guarantees field order.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The affected versions make unsafe memory accesses under the assumption that `#[repr(packed)]` has a guaranteed field order. \n\nThe Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts \nreordering fields of `#[repr(packed)]` structs, leading to illegal memory accesses.\n\nThe patched versions `0.9.7` and `0.10.3` use `#[repr(C, packed)]`, which guarantees field order.","format":"markdown","source":"ghsa"}],"published":"2024-07-01T12:00:00.000Z","modified":"2026-09-10T03:50:16.410Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"type":"semver","introduced":"0.10.0","status":"affected","fixed":"0.10.3"}],"ecosystem":"crates.io","package":"zerovec-derive","purl":"pkg:cargo/zerovec-derive","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.7"}],"ecosystem":"crates.io","package":"zerovec-derive","purl":"pkg:cargo/zerovec-derive","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.9.7"},{"type":"semver","introduced":"0.10.0","status":"affected","fixed":"0.10.3"}],"ecosystem":"crates.io","package":"zerovec-derive","purl":"pkg:cargo/zerovec-derive","source":"rustsec"}],"references":[{"url":"https://github.com/unicode-org/icu4x/issues/5196#issuecomment-2214711069","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rustsec/advisory-db/pull/2007","tags":["web"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0346.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/zerovec-derive","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-74r5-g7vc-j2v2","url":"https://github.com/advisories/GHSA-74r5-g7vc-j2v2","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:16.410Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0346","url":"https://rustsec.org/advisories/RUSTSEC-2024-0346.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:23.437Z"}],"updatedAt":"2026-11-25T22:56:43.197Z"}