CVE-2022-36114
Vulnerability from cvelistv5
Published
2022-09-14 00:00
Modified
2024-08-03 09:52
Summary
Extracting malicious crates can fill the file system
Impacted products
rust-langcargo
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T09:52:00.594Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp"
          },
          {
            "name": "https://github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "cargo",
          "vendor": "rust-lang",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 0.65.0"
            },
            {
              "status": "affected",
              "version": "= 0.66.0"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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\u0027s 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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "HIGH",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 4.8,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "NONE",
            "integrityImpact": "NONE",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-400",
              "description": "CWE-400: Uncontrolled Resource Consumption",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-08-14T16:17:41.758Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp"
        },
        {
          "name": "https://github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7"
        }
      ],
      "source": {
        "advisory": "GHSA-2hvr-h6gw-qrxp",
        "discovery": "UNKNOWN"
      },
      "title": "Extracting malicious crates can fill the file system"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2022-36114",
    "datePublished": "2022-09-14T00:00:00",
    "dateReserved": "2022-07-15T00:00:00",
    "dateUpdated": "2024-08-03T09:52:00.594Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-36114\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2022-09-14T18:15:10.830\",\"lastModified\":\"2023-08-14T17:15:09.983\",\"vulnStatus\":\"Modified\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"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\u0027s 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.\"},{\"lang\":\"es\",\"value\":\"Cargo es un administrador de paquetes para el lenguaje de programaci\u00f3n rust. Se ha detectado que Cargo no limitaba la cantidad de datos extra\u00eddos de los archivos comprimidos. Un atacante podr\u00eda descargar a un registro alternativo un paquete especialmente dise\u00f1ado que extrae muchos m\u00e1s datos que su tama\u00f1o (tambi\u00e9n se conoce como \\\"zip bomb\\\"), agotando el espacio en disco de la m\u00e1quina que usa Cargo para descargar el paquete. Tenga en cuenta que, por su dise\u00f1o, Cargo permite la ejecuci\u00f3n de c\u00f3digo en tiempo de compilaci\u00f3n, debido a los scripts de compilaci\u00f3n y las macros de procedimiento. Las vulnerabilidades de este aviso permiten llevar a cabo un subconjunto de los posibles da\u00f1os de una forma m\u00e1s dif\u00edcil de rastrear. Tus dependencias deben seguir siendo confiables si quieres estar protegido de los ataques, ya que es posible llevar a cabo los mismos ataques con scripts de construcci\u00f3n y macros de procedimiento. La vulnerabilidad est\u00e1 presente en todas las versiones de Cargo. Rust versi\u00f3n 1.64 , que ser\u00e1 publicada el 22 de septiembre, incluir\u00e1 una correcci\u00f3n para la misma. Dado que la vulnerabilidad es s\u00f3lo una forma m\u00e1s limitada de lograr lo que pueden hacer los scripts de construcci\u00f3n o las macros de procedimiento maliciosos, hemos decidido no publicar versiones puntuales de Rust que incluyan la correcci\u00f3n de seguridad. Los archivos de parche est\u00e1n disponibles para Rust versi\u00f3n 1.63.0 en el repositorio wg-security-response para las personas que construyen su propia cadena de herramientas. Recomendamos a usuarios de registros alternativos que tengan cuidado con el paquete que descargan, incluyendo s\u00f3lo dependencias confiables en sus proyectos. Tenga en cuenta que, incluso con estas vulnerabilidades corregidas, Cargo permite por dise\u00f1o una ejecuci\u00f3n de c\u00f3digo arbitrario en tiempo de compilaci\u00f3n gracias a los scripts de compilaci\u00f3n y las macros de procedimiento: una dependencia maliciosa podr\u00e1 causar da\u00f1os independientemente de estas vulnerabilidades. crates.io implement\u00f3 comprobaciones del lado del servidor para rechazar este tipo de paquetes hace a\u00f1os, y no se presentan paquetes en crates.io que exploten estas vulnerabilidades\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\",\"baseScore\":6.5,\"baseSeverity\":\"MEDIUM\"},\"exploitabilityScore\":2.8,\"impactScore\":3.6},{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"REQUIRED\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\",\"baseScore\":4.8,\"baseSeverity\":\"MEDIUM\"},\"exploitabilityScore\":1.2,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-400\"}]},{\"source\":\"nvd@nist.gov\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-400\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*\",\"versionEndExcluding\":\"0.65.0\",\"matchCriteriaId\":\"28D07B7F-9076-4BCD-8CBE-4CD7E1E996AB\"}]}]}],\"references\":[{\"url\":\"https://github.com/rust-lang/cargo/commit/d1f9553c825f6d7481453be8d58d0e7f117988a7\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Patch\",\"Third Party Advisory\"]},{\"url\":\"https://github.com/rust-lang/cargo/security/advisories/GHSA-2hvr-h6gw-qrxp\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Mitigation\",\"Third Party Advisory\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.