{
  "threat_severity" : "Important",
  "public_date" : "2023-08-03T12:00:00Z",
  "bugzilla" : {
    "description" : "rust-cargo: cargo does not respect the umask when extracting dependencies",
    "id" : "2228038",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2228038"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.7",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-276",
  "details" : [ "Cargo downloads the Rust project’s dependencies and compiles the project. Cargo prior to version 0.72.2, bundled with Rust prior to version 1.71.1, did not respect the umask when extracting crate archives on UNIX-like systems. If the user downloaded a crate containing files writeable by any local user, another local user could exploit this to change the source code compiled and executed by the current user. To prevent existing cached extractions from being exploitable, the Cargo binary version 0.72.2 included in Rust 1.71.1 or later will purge caches generated by older Cargo versions automatically. As a workaround, configure one's system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.", "A flaw was found in the rust-cargo package. Cargo, as bundled with the Rust compiler, did not respect the umask when extracting dependency tarballs and caching the extraction for future builds. If a dependency contained files with 0777 permissions, another local user could edit the cache of the extracted source code, potentially executing arbitrary code with the privileges of the user running Cargo during the next build." ],
  "acknowledgement" : "Red Hat would like to thank Addison Crump for reporting this issue.",
  "affected_release" : [ {
    "product_name" : "Red Hat Developer Tools",
    "release_date" : "2023-08-15T00:00:00Z",
    "advisory" : "RHSA-2023:4651",
    "cpe" : "cpe:/a:redhat:devtools:2023::el7",
    "package" : "rust-toolset-1.66-rust-0:1.66.1-2.el7_9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2023-08-14T00:00:00Z",
    "advisory" : "RHSA-2023:4635",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "rust-toolset:rhel8-8080020230807230209.0a78da64"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.6 Extended Update Support",
    "release_date" : "2024-05-28T00:00:00Z",
    "advisory" : "RHSA-2024:3428",
    "cpe" : "cpe:/a:redhat:rhel_eus:8.6",
    "package" : "rust-toolset:rhel8-8060020240312174911.aeeed864"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2023-08-14T00:00:00Z",
    "advisory" : "RHSA-2023:4634",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "rust-0:1.66.1-2.el9_2"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9.0 Extended Update Support",
    "release_date" : "2024-05-28T00:00:00Z",
    "advisory" : "RHSA-2024:3418",
    "cpe" : "cpe:/a:redhat:rhel_eus:9.0",
    "package" : "rust-0:1.58.1-1.el9_0.1"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2023-38497\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-38497\nhttps://www.openwall.com/lists/oss-security/2023/08/03/2" ],
  "name" : "CVE-2023-38497",
  "mitigation" : {
    "value" : "We recommend configuring your system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.",
    "lang" : "en:us"
  },
  "csaw" : false
}