# CVE-2021-45680: vec-const attempts to construct a Vec from a pointer to a const slice

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.09%, higher than 66% of CVEs (2026-12-01)
- Published: 2021-08-14T12:00:00.000Z
- Modified: 2026-06-17T04:13:56.137Z
- Also known as: GHSA-jmwx-r3gq-qq3p, GHSA-x76r-966h-5qv9, RUSTSEC-2021-0082
- Weaknesses: CWE-787
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- vec-const (crates.io): before 2.0.0; from 0.0.0-0 before 2.0.0
- vec-const_project vec-const: before 2.0.0

## Every score

- GitHub: rating Medium
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://rustsec.org/advisories/RUSTSEC-2021-0082.html> (advisory, third-party-advisory, web)
- <https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/vec-const/RUSTSEC-2021-0082.md> (third-party-advisory, web)
- <https://github.com/Eolu/vec-const/issues/1#issuecomment-898908241> (report, web)
- <https://github.com/Eolu/vec-const> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-45680> (advisory)
- <https://crates.io/crates/vec-const> (package)

## Sources

- CVE List: [CVE-2021-45680](https://www.cve.org/CVERecord?id=CVE-2021-45680), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-jmwx-r3gq-qq3p](https://github.com/advisories/GHSA-jmwx-r3gq-qq3p), CC-BY-4.0, modified 2023-11-08
- GitHub Advisory Database: [GHSA-x76r-966h-5qv9](https://github.com/advisories/GHSA-x76r-966h-5qv9), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0082](https://rustsec.org/advisories/RUSTSEC-2021-0082.html), CC0-1.0, modified 2025-12-17
- NVD: [CVE-2021-45680](https://nvd.nist.gov/vuln/detail/CVE-2021-45680), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-45680 · Whole record: https://cve.day/CVE-2021-45680.json · Rebuilt by cve.day 2026-11-25T22:58:06.259Z
