CVE-2021-28875
rust: heap-based buffer overflow in read_to_end() because it does not validate the return value from Read in an unsafe context
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 10, 2021
Updated · August 9, 2026
Description
In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value from Read in an unsafe context. This bug could lead to a buffer overflow.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE-119 · Improper Restriction of Operations within the Bounds of a Memory Buffer