CVE catalog

CVE-2022-36114

cargo: CVE-2022-36114

[CVE catalog]

Severity
Medium · CVSS 5.4CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
Published
Source
[NVD] · [CVE record]
EPSS
0.95% · Oct 27, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiancargobookworm0.66.0+ds1-1fixed
Debianrust-cargosid0.99.0-1fixed
Debianrust-cargoforky0.99.0-1fixed
Debianrust-cargotrixie0.86.0-2fixed
Debianrust-cargobookworm0.66.0-1fixed
Ubuntucargopro0.19.0-0ubuntu1vulnerable
Ubuntucargopro0.22.0-0ubuntu1vulnerable
Ubuntucargopro0.22.0-0ubuntu2vulnerable
Ubuntucargopro0.23.0-0ubuntu1vulnerable
Ubuntucargopro0.24.0-1ubuntu1vulnerable
Ubuntucargopro0.25.0-1ubuntu1vulnerable
Ubuntucargopro0.26.0-0ubuntu1vulnerable
Ubuntucargopro0.26.0-0ubuntu2vulnerable
Ubuntucargopro0.29.0-1ubuntu1~18.04.1vulnerable
Ubuntucargopro0.31.0-3ubuntu1~18.04.4vulnerable
Ubuntucargopro0.32.0-1~exp1ubuntu1~18.04.1vulnerable
Ubuntucargopro0.33.0-1ubuntu1~18.04.1vulnerable
Ubuntucargopro0.35.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.36.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.37.0-3ubuntu1~18.04.1vulnerable
Ubuntucargopro0.38.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.40.0-3ubuntu1~18.04.1vulnerable
Ubuntucargopro0.42.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.44.1-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.47.0-1~exp1ubuntu1~18.04.1vulnerable
Ubuntucargopro0.52.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.54.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.58.0-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.60.0ubuntu1-0ubuntu1~18.04.1vulnerable
Ubuntucargopro0.62.0ubuntu0libgit2-0ubuntu0.18.04.1vulnerable
Ubuntucargopro0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04vulnerable
Ubuntucargopro0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1vulnerable
Ubuntucargo20.040.37.0-3ubuntu2vulnerable
Ubuntucargo20.040.38.0-0ubuntu1vulnerable
Ubuntucargo20.040.39.0-0ubuntu1vulnerable
Ubuntucargo20.040.39.0+really0.38.0-0ubuntu1vulnerable
Ubuntucargo20.040.39.0+really0.39.0-0ubuntu1vulnerable
Ubuntucargo20.040.40.0-3ubuntu1vulnerable
Ubuntucargo20.040.40.0-3ubuntu2vulnerable
Ubuntucargo20.040.41.0-0ubuntu1vulnerable
Ubuntucargo20.040.42.0-0ubuntu1vulnerable
Ubuntucargo20.040.44.1-0ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.47.0-1~exp1ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.52.0-0ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.54.0-0ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.58.0-0ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.60.0ubuntu1-0ubuntu1~20.04.1vulnerable
Ubuntucargo20.040.62.0ubuntu0libgit2-0ubuntu0.20.04.1vulnerable
Ubuntucargo20.040.66.0+ds0ubuntu0.libgit2-0ubuntu0.20.04vulnerable
Ubuntucargo20.040.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2fixed
Ubuntucargo22.040.52.0-0ubuntu1vulnerable
Ubuntucargo22.040.53.0-0ubuntu2vulnerable
Ubuntucargo22.040.54.0-0ubuntu1vulnerable
Ubuntucargo22.040.54.0-0ubuntu2vulnerable
Ubuntucargo22.040.57.0+ubuntu-0ubuntu1vulnerable
Ubuntucargo22.040.58.0-0ubuntu1vulnerable
Ubuntucargo22.040.60.0ubuntu1-0ubuntu1~22.04.1vulnerable
Ubuntucargo22.040.62.0ubuntu0libgit2-0ubuntu0.22.04.1vulnerable
Ubuntucargo22.040.66.0+ds0ubuntu0.libgit2-0ubuntu0.22.04vulnerable
Ubuntucargo22.040.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancargosourcebookworm0.63.1-1not yet assignedNot reported[1021142]
Debianrust-cargosourcesid0.66.0-1not yet assignedNot reported[1021143]
Debianrust-cargosourceforky0.66.0-1not yet assignedNot reported[1021143]
Debianrust-cargosourcetrixie0.66.0-1not yet assignedNot reported[1021143]
Debianrust-cargosourcebookworm0.66.0-1not yet assignedNot reported[1021143]
Ubuntucargodeb20.040.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2Not reportedUBUNTU-CVE-2022-36114Not reported
Ubuntucargodeb22.040.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2Not reportedUBUNTU-CVE-2022-36114Not reported

[Debian bug #1021142][Debian bug #1021143]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [cargo]Fixed
    Details (2)
    • 0.66.0+ds1-1 · amd64 · bookworm

      Fixed · Fixed: 0.63.1-1

      dsa · cargo · debian · bookworm

    • 0.66.0+ds1-1 · arm64 · bookworm

      Fixed · Fixed: 0.63.1-1

      dsa · cargo · debian · bookworm

  • [cargo-doc]Fixed

    Source package: [cargo]

    Details (2)
    • 0.66.0+ds1-1 · all · bookworm

      Fixed · Fixed: 0.63.1-1

      dsa · cargo · debian · bookworm

    • 0.66.0+ds1-1 · all · bookworm

      Fixed · Fixed: 0.63.1-1

      dsa · cargo · debian · bookworm

  • Source package: [rust-cargo]

    Details (2)
    • 0.66.0-1 · amd64 · bookworm

      Fixed · Fixed: 0.66.0-1

      dsa · rust-cargo · debian · bookworm

    • 0.66.0-1 · arm64 · bookworm

      Fixed · Fixed: 0.66.0-1

      dsa · rust-cargo · debian · bookworm

Observed:

References