rustc — security advisory
In the standard library in Rust before 1.52.0, the Zip implementation has a panic safety issue. It calls __iterator_get_unchecked() more than once for the same index when the underlying iterator panics (in certain conditions). This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
- Products
- rustc
- Affected versions
- Not specified
- Fixed versions
- 1.53.0+dfsg1-1
- CVEs
- CVE-2021-28876
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 00:56 UTC · Revision 1
Source evidence
In the standard library in Rust before 1.52.0, the Zip implementation has a panic safety issue. It calls __iterator_get_unchecked() more than once for the same index when the underlying iterator panics (in certain conditions). This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
osv:DEBIAN-CVE-2021-28876
rustc
Fixed versions: 1.53.0+dfsg1-1
rustc
Fixed versions: 1.53.0+dfsg1-1
rustc
Fixed versions: 1.53.0+dfsg1-1
Complete source record
{
"id": "4c5f27b20cbf90414001af638d22d7b66e222ff1efcb9c8ad20426283e982805",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-28876",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2021-28876",
"summary": "In the standard library in Rust before 1.52.0, the Zip implementation has a panic safety issue. It calls __iterator_get_unchecked() more than once for the same index when the underlying iterator panics (in certain conditions). This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.",
"evidence": "osv:DEBIAN-CVE-2021-28876",
"products": [
{
"name": {
"value": "rustc",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.53.0+dfsg1-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "rustc",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.53.0+dfsg1-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "rustc",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.53.0+dfsg1-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2021-28876",
"aliases": [
"DEBIAN-CVE-2021-28876"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.53.0+dfsg1-1"
}
]
}
],
"package": {
"name": "rustc",
"purl": "pkg:deb/debian/rustc?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-28876.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.53.0+dfsg1-1"
}
]
}
],
"package": {
"name": "rustc",
"purl": "pkg:deb/debian/rustc?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-28876.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.53.0+dfsg1-1"
}
]
}
],
"package": {
"name": "rustc",
"purl": "pkg:deb/debian/rustc?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-28876.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-23T18:03:57.501165044Z",
"provider": "osv",
"upstream": [
"CVE-2021-28876"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2021-28876"
]
},
"related_cves": [
{
"value": "CVE-2021-28876",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 422747,
"published_at": "2021-04-11T20:15:12.687+00:00"
}