CVE-2021-29939
HIGH 7.3CVSS 3.1Out of bounds write in stackvector
An issue was discovered in the stackvector crate through 2021-02-19 for Rust. There is an out-of-bounds write in StackVec::extend if size_hint provides certain anomalous data.
- Published
- 1 Apr 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-787
- Also known as
- GHSA-9frf-r7c7-j2vgRUSTSEC-2021-0048
- Sources
- NVDJSONOSV GHSA-9frf-r7c7-j2vgJSONOSV RUSTSEC-2021-0048JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | RustSec | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | stackvector_project | stackvectorcpe:2.3:a:stackvector_project:stackvector:*:*:*:*:*:rust:*:* |
< 1.0.9 | 1.0.9 |
| OSV | crates.io | stackvector | < 1.0.9 | 1.0.9 |
| OSV | crates.io | stackvector | >= 0.0.0-0, < 1.0.9 | 1.0.9 |
References
- https://rustsec.org/advisories/RUSTSEC-2021-0048.html · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2021-29939 · ADVISORY
- https://github.com/Alexhuszagh/rust-stackvector/issues/2 · WEB, REPORT
- https://github.com/Alexhuszagh/rust-stackvector · PACKAGE
- https://crates.io/crates/stackvector · PACKAGE
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 1 Apr 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 19 Feb 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 25 Aug 2021)