Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. cargo
  4. ›
  5. CVE-2022-36114

CVE-2022-36114: Cargo extracting malicious crates can fill the file system

September 16, 2022 (updated September 21, 2022)

The Rust Security Response WG was notified that Cargo did not prevent extracting some malformed packages downloaded from alternate registries. An attacker able to upload packages to an alternate registry could fill the file system when Cargo downloaded the package.

The severity of this vulnerability is “low” for users of alternate registries. Users relying on crates.io are not affected.

Note that by design Cargo allows code execution at build time, due to build scripts and procedural macros. The vulnerabilities in this advisory allow performing a subset of the possible damage in a harder to track down way. Your dependencies must still be trusted if you want to be protected from attacks, as it’s possible to perform the same attacks with build scripts and procedural macros.

References

  • github.com/advisories/GHSA-2hvr-h6gw-qrxp
  • github.com/rust-lang/cargo
  • github.com/rust-lang/cargo/commit/2b68d3c07a4a056264dc006ecb9f1354a0679cd3
  • github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7
  • github.com/rust-lang/cargo/commit/d87d57dbbda61754f4fab0f329a7ac520e062c46
  • github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp
  • nvd.nist.gov/vuln/detail/CVE-2022-36114
  • security.gentoo.org/glsa/202210-09

Code Behaviors & Features

Detect and mitigate CVE-2022-36114 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 0.65.0, all versions starting from 0.66.0 before 0.67.0, version 0.66.0

Fixed versions

  • 0.65.0
  • 0.67.0

Solution

Upgrade to versions 0.65.0, 0.67.0 or above.

Impact 4.2 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

cargo/cargo/CVE-2022-36114.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:41 +0000.