CVE-2021-45680 json
vec-const attempts to construct a Vec from a pointer to a const slice
published 2021-08-14 5 y ago modified 2026-06-17 4 mo ago also GHSA-jmwx-r3gq-qq3p , GHSA-x76r-966h-5qv9 , RUSTSEC-2021-0082 , EUVD-2022-0737
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io vec-const 2.0.0
- vec-const_project vec-const 2.0.0
Exploit prediction
1.09% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | vec-const | <2.0.0 >=0.0.0-0, <2.0.0 |
2.0.0 |
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
rustsec.org
/advisories/RUSTSEC-2021-0082.html
web, third-party-advisory, advisory
-
raw.githubusercontent.com
/rustsec/advisory-db/main/crates/vec-const/RUSTSEC-2021-0082.md
web, third-party-advisory
-
github.com
/Eolu/vec-const/issues/1#issuecomment-898908241
web, report
-
github.com
/Eolu/vec-const
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-45680
advisory
-
crates.io
/crates/vec-const
package
Sources
- CVE List CVE-2021-45680
- GitHub Advisory GHSA-jmwx-r3gq-qq3p
- GitHub Advisory GHSA-x76r-966h-5qv9
- NVD CVE-2021-45680
- OSV RUSTSEC-2021-0082
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.