Rust advisories / stack
Vulnerability CriticalRUSTSEC-2020-0042 · stack
RUSTSEC-2020-0042: Missing check in ArrayVec leads to out-of-bounds write.
Short answerA security vulnerability in the stack crate: Missing check in ArrayVec leads to out-of-bounds write.. Critical severity (CVSS 9.8). Fixed in 0.3.1: update to a fixed version.
| Crate | stack |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.3.1. |
| Fixed in | 0.3.1 |
| Severity | Critical, CVSS 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2020-09-24 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2020-35895, GHSA-h45v-vgvp-3h5v |
What to do
- See which version you have:
cargo tree -i stack(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p stack. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplestack = "0.3.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
ArrayVec::insert allows insertion of an element into the array object into the specified index. Due to a missing check on the upperbound of this index, it is possible to write out of bounds.
References
- Package: crates.io/crates/stack
- Advisory: rustsec.org/advisories/RUSTSEC-2020-0042.html
- Report: github.com/arcnmx/stack-rs/issues/4
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 →Also worth your time
Did this answer your question?