Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. vec-const
  4. ›
  5. CVE-2021-45680

CVE-2021-45680: Out-of-bounds Write in vec-const

January 6, 2022 (updated January 7, 2022)

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.

References

  • github.com/Eolu/vec-const
  • github.com/Eolu/vec-const/issues/1
  • github.com/advisories/GHSA-x76r-966h-5qv9
  • nvd.nist.gov/vuln/detail/CVE-2021-45680
  • raw.githubusercontent.com/rustsec/advisory-db/main/crates/vec-const/RUSTSEC-2021-0082.md
  • rustsec.org/advisories/RUSTSEC-2021-0082.html

Code Behaviors & Features

Detect and mitigate CVE-2021-45680 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.0

Fixed versions

  • 2.0.0

Solution

Upgrade to version 2.0.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-787: Out-of-bounds Write

Source file

cargo/vec-const/CVE-2021-45680.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:16 +0000.