Rust advisories / adtensor
Vulnerability CriticalRUSTSEC-2021-0045 · adtensor
RUSTSEC-2021-0045: FromIterator implementation for Vector/Matrix can drop uninitialized memory
Short answerA security vulnerability in the adtensor crate: FromIterator implementation for Vector/Matrix can drop uninitialized memory. Critical severity (CVSS 9.8). No fixed version: replace the crate or remove the affected code path.
| Crate | adtensor |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Every version. |
| Fixed in | none |
| 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 | 2021-01-11 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-29936, GHSA-rg4m-gww5-7p47 |
What to do
- Find who pulls it in:
cargo tree -i adtensor. - Avoid the affected API, or replace the crate.
Details from the advisory
The FromIterator<T> methods for Vector and Matrix rely on the type parameter N to allocate space in the iterable.
If the passed in N type parameter is larger than the number of items returned by the iterator, it can lead to uninitialized memory being left in the Vector or Matrix type which gets dropped.
References
- Package: crates.io/crates/adtensor
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0045.html
- Report: github.com/charles-r-earp/adtensor/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?