Original description
In the standard library in Rust before 1.52.0, the Zip implementation calls __iterator_get_unchecked() more than once for the same index (under certain conditions) when next_back() and next() are used together. This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
Affected software
- Rust < 1.52.0 Fixed in: 1.52.0 exact match
Details
- Published
- 2021-04-11
- Last modified
- 2026-06-17
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- CWE
- CWE-119
- EPSS (30-day exploit probability)
- 2.00% (percentile 81)
References
- cve.org/CVE-2021-28878
- nvd.nist.gov/vuln/detail/CVE-2021-28878
- github.com/rust-lang/rust/issues/82291
- github.com/rust-lang/rust/pull/82292
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/T...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V...
- security.gentoo.org/glsa/202210-09
Track these versions on your own servers
InfraGuard collects installed software versions from every server and flags the ones with known vulnerabilities. Self-hosted — nothing leaves your network.
This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE® is a registered trademark of The MITRE Corporation; CVE records are used under the CVE Program Terms of Use.