{"id":"CVE-2021-45680","aliases":["EUVD-2022-0737","GHSA-jmwx-r3gq-qq3p","GHSA-x76r-966h-5qv9","RUSTSEC-2021-0082"],"status":"published","title":"vec-const attempts to construct a Vec from a pointer to a const slice","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","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-10","score":0.01088,"percentile":0.65602,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-787"],"published":"2021-08-14T12:00:00Z","modified":"2026-06-17T04:13:56Z","fixes":[{"ecosystem":"crates.io","package":"vec-const","fixed_in":["2.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"vec-const","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"vec-const","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"vec-const","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"vec-const","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"vec-const","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"2.0.0"}]}]}],"products":[{"vendor":"vec-const_project","product":"vec-const"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0082.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/vec-const/RUSTSEC-2021-0082.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/Eolu/vec-const/issues/1#issuecomment-898908241","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-jmwx-r3gq-qq3p"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45680","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-x76r-966h-5qv9"},{"url":"https://github.com/Eolu/vec-const","tags":["web"]},{"url":"https://crates.io/crates/vec-const","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-45680","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","status":"published","published":"2021-12-26T21:53:12Z","modified":"2024-08-04T04:47:01.794Z","updated_at":"2026-11-02T14:33:02.580561Z"}],"euvd":[{"id":"EUVD-2022-0737","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","status":"published","published":"2021-12-26T21:53:12Z","modified":"2024-08-04T04:47:01Z","updated_at":"2026-11-03T03:08:25.77408Z"}],"ghsa":[{"id":"GHSA-x76r-966h-5qv9","title":"Out-of-bounds Write in vec-const","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","status":"published","published":"2022-01-06T22:15:56Z","modified":"2023-06-13T22:24:15Z","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-787"],"updated_at":"2026-11-02T14:36:54.225318Z"},{"id":"GHSA-jmwx-r3gq-qq3p","title":"vec-const attempts to construct a Vec from a pointer to a const slice","description":"Affected versions of this crate claimed to construct a const `Vec` with nonzero length and capacity, but that cannot be done because such a `Vec` requires a pointer from an allocator.\n\nThe implementation was later changed to just construct a `std::borrow::Cow`.\n","status":"published","published":"2022-06-17T00:27:57Z","modified":"2023-01-12T05:01:07Z","updated_at":"2026-11-02T14:36:13.23016Z"}],"nvd":[{"id":"CVE-2021-45680","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","status":"published","published":"2021-12-27T00:15:08.81Z","modified":"2026-06-17T04:13:56.137Z","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-787"],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"GHSA-x76r-966h-5qv9","title":"Out-of-bounds Write in vec-const","description":"An issue was discovered in the vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.","status":"published","published":"2022-01-06T22:15:56Z","modified":"2023-11-08T04:07:21.429742Z","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-787"],"updated_at":"2026-11-02T15:46:59.484835Z"},{"id":"GHSA-jmwx-r3gq-qq3p","title":"vec-const attempts to construct a Vec from a pointer to a const slice","description":"Affected versions of this crate claimed to construct a const `Vec` with nonzero length and capacity, but that cannot be done because such a `Vec` requires a pointer from an allocator.\n\nThe implementation was later changed to just construct a `std::borrow::Cow`.\n","status":"published","published":"2022-06-17T00:27:57Z","modified":"2023-11-08T04:07:21.429742Z","updated_at":"2026-11-02T15:46:50.687609Z"},{"id":"RUSTSEC-2021-0082","title":"vec-const attempts to construct a Vec from a pointer to a const slice","description":"Affected versions of this crate claimed to construct a const `Vec` with nonzero length and capacity, but that cannot be done because such a `Vec` requires a pointer from an allocator.\n\nThe implementation was later changed to just construct a `std::borrow::Cow`.","status":"published","published":"2021-08-14T12:00:00Z","modified":"2025-12-17T17:18:32.343835Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
