CVE-2021-28877
published 2021-04-11CVE-2021-28877: In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug…
PriorityP335high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
1.39%
69.0th percentile
In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
Affected
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | rustc | < rustc 1.53.0+dfsg1-1 (bookworm) | rustc 1.53.0+dfsg1-1 (bookworm) |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cm1_rust_1.47.0-3_on_cbl_mariner_1.0 | — | — |
| rust-lang | rust | < 1.51.0 | 1.51.0 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv7.5HIGH
vendor_debian7.5HIGH
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Microsoft
In the standard library in Rust before 1.51.0 the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due
vendor_msrc·2021-04-13·CVSS 7.5
CVE-2021-28877 [HIGH] CWE-119 In the standard library in Rust before 1.51.0 the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due
In the standard library in Rust before 1.51.0 the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. I
Red Hat
rust: memory safety violation in Zip implementation for nested iter::Zips
vendor_redhat·2021-01-16·CVSS 7.5
CVE-2021-28877 [HIGH] rust: memory safety violation in Zip implementation for nested iter::Zips
rust: memory safety violation in Zip implementation for nested iter::Zips
In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
Package: rust (Red Hat Enterprise Linux 9) - Not affected
Debian
CVE-2021-28877: rustc - In the standard library in Rust before 1.51.0, the Zip implementation calls __it...
vendor_debian·2021·CVSS 7.5
CVE-2021-28877 [HIGH] CVE-2021-28877: rustc - In the standard library in Rust before 1.51.0, the Zip implementation calls __it...
In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
Scope: local
bookworm: resolved (fixed in 1.53.0+dfsg1-1)
bullseye: open
forky: resolved (fixed in 1.53.0+dfsg1-1)
sid: resolved (fixed in 1.53.0+dfsg1-1)
trixie: resolved (fixed in 1.53.0+dfsg1-1)
GHSA
GHSA-r23x-h32h-x9jh: In the standard library in Rust before 1
ghsa_unreviewed·2022-05-24
CVE-2021-28877 [HIGH] CWE-119 GHSA-r23x-h32h-x9jh: In the standard library in Rust before 1
In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
OSV
CVE-2021-28877: In the standard library in Rust before 1
osv·2021-04-11·CVSS 7.5
CVE-2021-28877 [HIGH] CVE-2021-28877: In the standard library in Rust before 1
In the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2021-04-11
Published