CVE-2021-28878

rust: memory safety violation in Zip implementation when next_back() and next() are used together

Published Apr 11, 2021 CVSS 3.1 · 7.5 High EPSS 2.0% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2021-15531 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.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00107}

epss

{'score': 0.00125}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 3, 2024, 9:55 PM
Reserved
Mar 19, 2021, 12:00 AM
Status
Modified
Published
Apr 11, 2021, 8:15 PM
Modified
Jun 17, 2026, 3:47 AM
Severity
Moderate
Public date
Mar 7, 2021, 12:00 AM