Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-36114

MEDIUM 4.8EPSS 63%

Extracting malicious crates can fill the file system

Also known as GHSA-2hvr-h6gw-qrxp

Mitigation

  • Upgrade cargo to one of 0.65.0, 0.67.0 (or later in the same release line).

Who should check

  • Projects that depend on crates.io package cargo (< 0.65.0)
  • Anyone running rust-lang cargo < 0.65.0; = 0.66.0

Vulnerability facts

Affected
cargo < 0.65.0
Fixed in
0.65.0, 0.67.0
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, login needed
CVSS
4.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: Low
  • User interaction: Required
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
1.03% chance of exploitation in 30 days (percentile 63, 2026-11-26)
CWE
CWE-400
Published
Modified

Description

Cargo is a package manager for the rust programming language. It was discovered that Cargo did not limit the amount of data extracted from compressed archives. An attacker could upload to an alternate registry a specially crafted package that extracts way more data than its size (also known as a "zip bomb"), exhausting the disk space on the machine using Cargo to download the package. 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. The vulnerability is present in all versions of Cargo. Rust 1.64, to be released on September 22nd, will include a fix for it. Since the vulnerability is just a more limited way to accomplish what a malicious build scripts or procedural macros can do, we decided not to publish Rust point releases backporting the security fix. Patch files are available for Rust 1.63.0 are available in the wg-security-response repository for people building their own toolchain. We recommend users of alternate registries to excercise care in which package they download, by only including trusted dependencies in their projects. Please note that even with these vulnerabilities fixed, by design Cargo allows arbitrary code execution at build time thanks to build scripts and procedural macros: a malicious dependency will be able to cause damage regardless of these vulnerabilities. crates.io implemented server-side checks to reject these kinds of packages years ago, and there are no packages on crates.io exploiting these vulnerabilities. crates.io users still need to excercise care in choosing their dependencies though, as the same concerns about build scripts and procedural macros apply here.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io cargo< 0.65.00.65.0, 0.67.0osv
rust-lang cargo< 0.65.0; = 0.66.0—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2022-36114. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-36114.md
Affected: cargo < 0.65.0
Fixed in: 0.65.0, 0.67.0

Steps:
1. Search this machine and project for cargo (crates.io), rust-lang cargo: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2022-36114 being exploited?

There is no confirmed exploitation: CVE-2022-36114 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.03% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2022-36114?

Medium: CVSS 4.8 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2022-36114?

cargo < 0.65.0.

Is there a fix for CVE-2022-36114?

Yes. Fixed in 0.65.0, 0.67.0. Upgrade cargo to one of 0.65.0, 0.67.0 (or later in the same release line).

How do I check if I'm affected by CVE-2022-36114?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors