
CVE catalog
CVE-2021-28878
rustc: CVE-2021-28878
- Severity
- High · CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 2.00% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | rustc | sid | 1.97.1+dfsg1-1 | fixed |
| Debian | rustc | forky | 1.97.1+dfsg1-1 | fixed |
| Debian | rustc | trixie | 1.85.1+dfsg1-1+deb13u1 | fixed |
| Debian | rustc | bookworm | 1.63.0+dfsg1-2 | fixed |
| Ubuntu | rustc | pro | 1.7.0+dfsg1-1 | vulnerable |
| Ubuntu | rustc | pro | 1.15.1+dfsg0-1~exp1ubuntu2~16.04.3 | vulnerable |
| Ubuntu | rustc | pro | 1.17.0+dfsg2-8~ubuntu0.16.04.2 | vulnerable |
| Ubuntu | rustc | pro | 1.21.0+dfsg1+llvm-0ubuntu3~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.22.1+dfsg1+llvm-0ubuntu2~16.04.2 | vulnerable |
| Ubuntu | rustc | pro | 1.24.1+dfsg1+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.25.0+dfsg1+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.28.0+dfsg1+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.30.0+dfsg1+llvm-2ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.31.0+dfsg1+llvm-2ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.32.0+dfsg1+llvm-1ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.34.1+dfsg2+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.35.0+dfsg0.1+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.36.0+dfsg1+llvm-2ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.37.0+dfsg1+llvm-1ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.39.0+dfsg1+llvm-3ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.41.0+dfsg1+llvm-0ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.43.0+dfsg1+llvm-1~exp1ubuntu2~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.47.0+dfsg1+llvm-1ubuntu1~16.04.1 | vulnerable |
| Ubuntu | rustc | pro | 1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.37.0+dfsg1+llvm-1ubuntu1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.38.0+dfsg0.2+llvm-0ubuntu1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.38.0+dfsg0.2+llvm-0ubuntu2 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.39.0+dfsg1+llvm-3ubuntu1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.40.0+dfsg1+llvm-5ubuntu1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.41.0+dfsg1+llvm-0ubuntu1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.41.0+dfsg1+llvm-0ubuntu2 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.47.0+dfsg1+llvm-1ubuntu1~20.04.1 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2 | vulnerable |
| Ubuntu | rustc | 20.04 | 1.53.0+dfsg1+llvm-4ubuntu1~20.04.1 | fixed |
| Ubuntu | rustc | 22.04 | 1.51.0+dfsg1+llvm-1~exp3ubuntu1 | vulnerable |
| Ubuntu | rustc | 22.04 | 1.53.0+dfsg1+llvm-4ubuntu1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | rustc | source | sid | 1.53.0+dfsg1-1 | not yet assigned | Not reported | [986803] |
| Debian | rustc | source | forky | 1.53.0+dfsg1-1 | not yet assigned | Not reported | [986803] |
| Debian | rustc | source | trixie | 1.53.0+dfsg1-1 | not yet assigned | Not reported | [986803] |
| Debian | rustc | source | bookworm | 1.53.0+dfsg1-1 | not yet assigned | Not reported | [986803] |
| Ubuntu | rustc | deb | 20.04 | 1.53.0+dfsg1+llvm-4ubuntu1~20.04.1 | Not reported | UBUNTU-CVE-2021-28878 | Not reported |
| Ubuntu | rustc | deb | 22.04 | 1.53.0+dfsg1+llvm-4ubuntu1 | Not reported | UBUNTU-CVE-2021-28878 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [libstd-rust-1.63]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· arm64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [libstd-rust-dev]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· arm64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [libstd-rust-dev-wasm32]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [libstd-rust-dev-windows]Fixed
Source package: [rustc]
Details (1)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-all]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rustc]Fixed
Details (2)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· arm64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-clippy]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· arm64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-doc]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rustfmt]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· amd64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· arm64 · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-gdb]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-lldb]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
- [rust-src]Fixed
Source package: [rustc]
Details (2)
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
1.63.0+dfsg1-2· all · bookwormFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · bookworm; dsa · rustc · debian · 12
[Debian 13 (Trixie)]
- [cargo]Fixed
Source package: [rustc]
Details (4)
1.85.0+dfsg3-1· amd64 · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.85.0+dfsg3-1· arm64 · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.94.1+dfsg1-1~bpo13+3· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.94.1+dfsg1-1~bpo13+3· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [cargo-doc]Fixed
Source package: [rustc]
Details (20)
1.85.0+dfsg3-1· all · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.85.0+dfsg3-1· all · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.86.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.86.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.87.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.87.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.88.0+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.88.0+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.89.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.89.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.90.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.90.0+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.91.1+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.91.1+dfsg1-1~bpo13+2· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.92.0+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.92.0+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.93.1+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.93.1+dfsg1-2~bpo13+1· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.94.1+dfsg1-1~bpo13+3· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.94.1+dfsg1-1~bpo13+3· all · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.85]Fixed
Source package: [rustc]
Details (2)
1.85.0+dfsg3-1· amd64 · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.85.0+dfsg3-1· arm64 · trixieFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.86]Fixed
Source package: [rustc]
Details (2)
1.86.0+dfsg1-1~bpo13+2· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.86.0+dfsg1-1~bpo13+2· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.87]Fixed
Source package: [rustc]
Details (2)
1.87.0+dfsg1-1~bpo13+2· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.87.0+dfsg1-1~bpo13+2· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.88]Fixed
Source package: [rustc]
Details (2)
1.88.0+dfsg1-2~bpo13+1· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.88.0+dfsg1-2~bpo13+1· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.89]Fixed
Source package: [rustc]
Details (2)
1.89.0+dfsg1-1~bpo13+2· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.89.0+dfsg1-1~bpo13+2· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
- [libstd-rust-1.90]Fixed
Source package: [rustc]
Details (2)
1.90.0+dfsg1-1~bpo13+2· amd64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
1.90.0+dfsg1-1~bpo13+2· arm64 · trixie-backportsFixed · Fixed:
1.53.0+dfsg1-1dsa · rustc · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2021_3063.json]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-28878]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-28878]
- [https://security-tracker.debian.org/tracker/CVE-2021-28878]
- [https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-28878.json]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]