Memory Safety Vulnerability in Rust Standard Library's Zip Implementation
CVE-2021-28876
Key facts: CVE-2021-28876 is a medium severity (CVSS 5.3) vulnerability in Rust-lang Rust. No exploitation in the wild or public proof-of-concept has been recorded so far. Its EPSS score is 1.5%, the estimated probability of exploitation in the next 30 days.
What is CVE-2021-28876?
The Rust Standard Library prior to version 1.52.0 contains a vulnerability in its Zip implementation that presents a memory safety issue. Specifically, the implementation calls the __iterator_get_unchecked() function multiple times for the same index when the underlying iterator panics under certain conditions. This behavior violates safety requirements associated with the TrustedRandomAccess trait, potentially leading to memory corruption and other unpredictable behavior in applications that rely on the library for manipulation of zip data.
References
More Rust-lang vulnerabilities
- CVE-2024-24576: Rust standard library vulnerable to arbitrary shell command execution(CRITICAL)
