Rust advisories / generic-array
Vulnerability HighRUSTSEC-2020-0146 · generic-array
RUSTSEC-2020-0146: arr! macro erases lifetimes
Short answerA security vulnerability in the generic-array crate: arr! macro erases lifetimes. High severity (CVSS 7.5). Fixed in 0.10.1, 0.11.2, 0.12.4, 0.13.3, 0.8.4, 0.9.1: update to a fixed version.
| Crate | generic-array |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | From 0.8.0 before 0.8.4; from 0.9.0 before 0.9.1; from 0.10.0 before 0.10.1; from 0.11.0 before 0.11.2; from 0.12.0 before 0.12.4; from 0.13.0 before 0.13.3. |
| Fixed in | 0.10.1, 0.11.2, 0.12.4, 0.13.3, 0.8.4, 0.9.1 |
| Severity | High, CVSS 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Published | 2020-04-09 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2020-36465, GHSA-3358-4f7f-p4j4 |
What to do
- See which version you have:
cargo tree -i generic-array(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p generic-array. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplegeneric-array = "0.9.1") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of this crate allowed unsoundly extending lifetimes using arr! macro. This may result in a variety of memory corruption scenarios, most likely use-after-free.
References
- Package: crates.io/crates/generic-array
- Advisory: rustsec.org/advisories/RUSTSEC-2020-0146.html
- Report: github.com/fizyk20/generic-array/issues/98
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 crategeneric-array: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?