{"id":"CVE-2021-28875","aliases":["DEBIAN-CVE-2021-28875","EUVD-2021-15528","GHSA-fhrh-9gc2-pfgh","OESA-2021-1214","RHSA-2021:3042","RHSA-2021:3063","RLSA-2021:3063","UBUNTU-CVE-2021-28875"],"status":"published","title":"In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value...","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.02122,"percentile":0.82019,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-252"],"published":"2021-04-11T00:00:00Z","modified":"2026-10-24T10:50:07Z","fixes":[{"ecosystem":"Debian:12","package":"rustc","fixed_in":["1.53.0+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"rustc","fixed_in":["1.53.0+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rustc","fixed_in":["1.53.0+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"rustc","fixed_in":["1.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.53.0+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.53.0+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.53.0+dfsg1-1"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP1","package":"rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.51.0-1.oe1"}]}],"bundled":8},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-build","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-cargo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-cargo-doc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-clippy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rls","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-runtime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-analysis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-debugger-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-doc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-gdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-lldb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-src","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rust-std-static","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:devtools:2021","package":"rust-toolset-1.52-rustfmt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-2.el7_9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"cargo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"cargo-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"cargo-doc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"clippy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"clippy-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rls","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rls-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-analysis","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-debugger-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-doc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-gdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-lldb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-src","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-std-static","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rust-toolset","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rustfmt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::appstream","package":"rustfmt-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+11282+0729bac9"}]}],"bundled":7},{"source":"osv","ecosystem":"Rocky Linux:8","package":"rust","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+641+ca238f88"}]}],"bundled":7},{"source":"osv","ecosystem":"Rocky Linux:8","package":"rust-toolset","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.52.1-1.module+el8.4.0+641+ca238f88"}]}],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.15.1+dfsg0-1~exp1ubuntu2~14.04.7","1.17.0+dfsg2-8~ubuntu0.14.04.3","1.21.0+dfsg1+llvm-0ubuntu3~14.04.5","1.22.1+dfsg1+llvm-0ubuntu2~14.04.2","1.24.1+dfsg1+llvm-0ubuntu1~14.04.1","1.25.0+dfsg1+llvm-0ubuntu1~14.04.1","1.28.0+dfsg1+llvm-0ubuntu1~14.04.1","1.30.0+dfsg1+llvm-2ubuntu1~14.04.1","1.31.0+dfsg1+llvm-2ubuntu1~14.04.1","1.31.0+dfsg1+llvm-2ubuntu1~14.04.1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.0+dfsg1-1","1.15.1+dfsg0-1~exp1ubuntu2~16.04.3","1.17.0+dfsg2-8~ubuntu0.16.04.2","1.21.0+dfsg1+llvm-0ubuntu3~16.04.1","1.22.1+dfsg1+llvm-0ubuntu2~16.04.2","1.24.1+dfsg1+llvm-0ubuntu1~16.04.1","1.25.0+dfsg1+llvm-0ubuntu1~16.04.1","1.28.0+dfsg1+llvm-0ubuntu1~16.04.1","1.30.0+dfsg1+llvm-2ubuntu1~16.04.1","1.31.0+dfsg1+llvm-2ubuntu1~16.04.1","1.32.0+dfsg1+llvm-1ubuntu1~16.04.1","1.34.1+dfsg2+llvm-0ubuntu1~16.04.1","1.35.0+dfsg0.1+llvm-0ubuntu1~16.04.1","1.36.0+dfsg1+llvm-2ubuntu1~16.04.1","1.37.0+dfsg1+llvm-1ubuntu1~16.04.1","1.39.0+dfsg1+llvm-3ubuntu1~16.04.1","1.41.0+dfsg1+llvm-0ubuntu1~16.04.1","1.43.0+dfsg1+llvm-1~exp1ubuntu2~16.04.1","1.47.0+dfsg1+llvm-1ubuntu1~16.04.1","1.47.0+dfsg1+llvm-1ubuntu1~16.04.1ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rustc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2"}]}],"versions":["1.37.0+dfsg1+llvm-1ubuntu1","1.38.0+dfsg0.2+llvm-0ubuntu1","1.38.0+dfsg0.2+llvm-0ubuntu2","1.39.0+dfsg1+llvm-3ubuntu1","1.40.0+dfsg1+llvm-5ubuntu1","1.41.0+dfsg1+llvm-0ubuntu1","1.41.0+dfsg1+llvm-0ubuntu2","1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1","1.47.0+dfsg1+llvm-1ubuntu1~20.04.1"]}],"products":[{"vendor":"rust-lang","product":"rust"}],"references":[{"url":"https://github.com/rust-lang/rust/issues/80894","tags":["x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","report"]},{"url":"https://github.com/rust-lang/rust/pull/80895","tags":["x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://security.gentoo.org/glsa/202210-09","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28875","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-fhrh-9gc2-pfgh"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-28875","tags":["advisory"]},{"url":"https://openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1214","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36317","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28878","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28877","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28876","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28879","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36318","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36323","tags":["advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2021:3042","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"https://access.redhat.com/documentation/en-us/red_hat_developer_tools/1/html/using_rust_1.52.1_toolset","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1949194","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1949198","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1949204","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1949207","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1949211","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1950396","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1950398","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_3042.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2020-36323","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-36323","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-28875","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-28875","tags":["advisory","report"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-28876","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-28876","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-28877","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-28877","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-28878","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-28878","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-28879","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-28879","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-31162","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-31162","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31162","tags":["advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2021:3063","tags":["advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_3063.json","tags":["advisory"]},{"url":"https://errata.rockylinux.org/RLSA-2021:3063","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-28875","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-28875","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.","status":"published","published":"2021-04-11T00:00:00Z","modified":"2024-08-03T21:55:11.584Z","updated_at":"2026-11-02T14:33:08.811269Z"}],"euvd":[{"id":"EUVD-2021-15528","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.","status":"published","published":"2021-04-11T00:00:00Z","modified":"2024-08-03T21:55:11Z","updated_at":"2026-11-03T03:24:46.117926Z"}],"ghsa":[{"id":"GHSA-fhrh-9gc2-pfgh","title":"In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value...","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.","status":"published","published":"2022-05-24T17:47:05Z","modified":"2023-01-30T05:05:10Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-252"],"updated_at":"2026-11-02T14:47:12.491869Z"}],"nvd":[{"id":"CVE-2021-28875","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.","status":"published","published":"2021-04-11T20:15:12.627Z","modified":"2026-06-17T03:47:00.34Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-252"],"updated_at":"2026-11-02T14:06:51.610648Z"}],"osv":[{"id":"CVE-2021-28875","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.","status":"published","published":"2021-04-11T20:15:12.627Z","modified":"2026-10-24T10:50:07.559116657Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:19.129331Z"},{"id":"DEBIAN-CVE-2021-28875","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.","status":"published","published":"2021-04-11T20:15:12.627Z","modified":"2026-10-23T18:03:12.394877528Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:34.94143Z"},{"id":"OESA-2021-1214","title":"rust security update","description":"Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.\r\n\r\nSecurity Fix(es):\r\n\r\nIn the standard library in Rust before 1.49.0, String::retain() function has a panic safety problem. It allows creation of a non-UTF-8 Rust string when the provided closure panics. This bug could result in a memory safety violation when other string APIs assume that UTF-8 encoding is used on the same string.(CVE-2020-36317)\r\n\r\nIn 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.(CVE-2021-28875)\r\n\r\nIn 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.(CVE-2021-28878)\r\n\r\nIn the standard library in Rust before 1.51.0, the Zip implementation calls __iterator_get_unchecked() for the same index more than once when nested. This bug can lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.(CVE-2021-28877)\r\n\r\nIn 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.(CVE-2021-28876)\r\n\r\nIn the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer overflow. This bug can lead to a buffer overflow when a consumed Zip iterator is used again.(CVE-2021-28879)\r\n\r\nIn the standard library in Rust before 1.49.0, VecDeque::make_contiguous has a bug that pops the same element more than once under certain condition. This bug could result in a use-after-free or double free.(CVE-2020-36318)\r\n\r\nIn the standard library in Rust before 1.52.0, there is an optimization for joining strings that can cause uninitialized bytes to be exposed (or the program to crash) if the borrowed string changes after its length is checked.(CVE-2020-36323)","status":"published","published":"2021-06-12T11:04:27Z","modified":"2026-08-18T01:15:32.493769868Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:38.987987Z"},{"id":"RHSA-2021:3042","title":"Red Hat Security Advisory: rust-toolset-1.52 and rust-toolset-1.52-rust security and enhancement update","status":"published","published":"2024-09-14T01:22:44Z","modified":"2026-08-09T10:02:43Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:08.619234Z"},{"id":"RHSA-2021:3063","title":"Red Hat Security Advisory: rust-toolset:rhel8 security, bug fix, and enhancement update","status":"published","published":"2024-09-14T01:22:51Z","modified":"2026-08-09T10:02:43Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:08.619234Z"},{"id":"RLSA-2021:3063","title":"Moderate: rust-toolset:rhel8 security, bug fix, and enhancement update","description":"Rust Toolset provides the Rust programming language compiler rustc, the cargo build tool and dependency manager, and required libraries.\n\nThe following packages have been upgraded to a later upstream version: rust (1.52.1). (BZ#1953002)\n\nSecurity Fix(es):\n\n* rust: optimization for joining strings can cause uninitialized bytes to be exposed (CVE-2020-36323)\n\n* rust: heap-based buffer overflow in read_to_end() because it does not validate the return value from Read in an unsafe context (CVE-2021-28875)\n\n* rust: panic safety issue in Zip implementation (CVE-2021-28876)\n\n* rust: memory safety violation in Zip implementation for nested iter::Zips (CVE-2021-28877)\n\n* rust: memory safety violation in Zip implementation when next_back() and next() are used together (CVE-2021-28878)\n\n* rust: integer overflow in the Zip implementation can lead to a buffer overflow (CVE-2021-28879)\n\n* rust: double free in Vec::from_iter function if freeing the element panics (CVE-2021-31162)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.\n\nFor information on usage, see Using Rust Toolset linked in the References section.","status":"published","published":"2021-08-10T11:59:11Z","modified":"2026-02-05T01:30:08.211912Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:23.969672Z"},{"id":"UBUNTU-CVE-2021-28875","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.","status":"published","published":"2021-04-11T20:15:00Z","modified":"2026-04-22T12:51:24.68332Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:26.779273Z"}]}}
