What’s Vulnerable › Vulnerabilities
CVE-2021-28875
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.1% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-04-11 · updated 2026-06-17
- Weakness: CWE-252
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.
Affected products
- rust-lang rust: before 1.50.0 — fixed in 1.50.0
How to fix
Upgrade to a fixed version: rust-lang rust 1.50.0. Check the vendor advisory for mitigations.
References
- https://github.com/rust-lang/rust/issues/80894
- https://github.com/rust-lang/rust/pull/80895
- https://security.gentoo.org/glsa/202210-09
- https://github.com/rust-lang/rust/issues/80894
- https://github.com/rust-lang/rust/pull/80895
- https://security.gentoo.org/glsa/202210-09
Get alerted when CVE-2021-28875 or the next vulnerability affects your stack