UBUNTU-CVE-2023-38497 (CVE-2023-38497)
Vulnerability from osv_ubuntu – Published: 2023-08-03 12:00 – Updated: 2026-04-22 07:45 – Source websiteCargo 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.
{
"affected": [
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "cargo",
"binary_version": "0.47.0-1~exp1ubuntu1~16.04.1+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "cargo",
"purl": "pkg:deb/ubuntu/cargo@0.47.0-1~exp1ubuntu1~16.04.1+esm1?arch=source\u0026distro=esm-apps/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.47.0-1~exp1ubuntu1~16.04.1+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.8.0-1",
"0.16.0-0ubuntu1~16.04.1",
"0.18.0-0ubuntu0.16.04.1",
"0.22.0-0ubuntu0.16.04.1",
"0.23.0-0ubuntu0.16.04.1",
"0.25.0-1ubuntu1~16.04.1",
"0.26.0-0ubuntu2~16.04.1",
"0.29.0-1ubuntu1~16.04.1",
"0.31.0-3ubuntu1~16.04.1",
"0.32.0-1~exp1ubuntu1~16.04.1",
"0.33.0-1ubuntu1~16.04.1",
"0.35.0-0ubuntu1~16.04.1",
"0.36.0-0ubuntu1~16.04.1",
"0.37.0-3ubuntu1~16.04.1",
"0.38.0-0ubuntu1~16.04.1",
"0.40.0-3ubuntu1~16.04.1",
"0.42.0-0ubuntu1~16.04.1",
"0.44.1-0ubuntu1~16.04.1",
"0.47.0-1~exp1ubuntu1~16.04.1"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "cargo",
"binary_version": "0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:18.04:LTS",
"name": "cargo",
"purl": "pkg:deb/ubuntu/cargo@0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1?arch=source\u0026distro=esm-apps/bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.19.0-0ubuntu1",
"0.22.0-0ubuntu1",
"0.22.0-0ubuntu2",
"0.23.0-0ubuntu1",
"0.24.0-1ubuntu1",
"0.25.0-1ubuntu1",
"0.26.0-0ubuntu1",
"0.26.0-0ubuntu2",
"0.29.0-1ubuntu1~18.04.1",
"0.31.0-3ubuntu1~18.04.4",
"0.32.0-1~exp1ubuntu1~18.04.1",
"0.33.0-1ubuntu1~18.04.1",
"0.35.0-0ubuntu1~18.04.1",
"0.36.0-0ubuntu1~18.04.1",
"0.37.0-3ubuntu1~18.04.1",
"0.38.0-0ubuntu1~18.04.1",
"0.40.0-3ubuntu1~18.04.1",
"0.42.0-0ubuntu1~18.04.1",
"0.44.1-0ubuntu1~18.04.1",
"0.47.0-1~exp1ubuntu1~18.04.1",
"0.52.0-0ubuntu1~18.04.1",
"0.54.0-0ubuntu1~18.04.1",
"0.58.0-0ubuntu1~18.04.1",
"0.60.0ubuntu1-0ubuntu1~18.04.1",
"0.62.0ubuntu0libgit2-0ubuntu0.18.04.1",
"0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "cargo",
"binary_version": "0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:20.04:LTS",
"name": "cargo",
"purl": "pkg:deb/ubuntu/cargo@0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1?arch=source\u0026distro=esm-apps/focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.37.0-3ubuntu2",
"0.38.0-0ubuntu1",
"0.39.0-0ubuntu1",
"0.39.0+really0.38.0-0ubuntu1",
"0.39.0+really0.39.0-0ubuntu1",
"0.40.0-3ubuntu1",
"0.40.0-3ubuntu2",
"0.41.0-0ubuntu1",
"0.42.0-0ubuntu1",
"0.44.1-0ubuntu1~20.04.1",
"0.47.0-1~exp1ubuntu1~20.04.1",
"0.52.0-0ubuntu1~20.04.1",
"0.54.0-0ubuntu1~20.04.1",
"0.58.0-0ubuntu1~20.04.1",
"0.60.0ubuntu1-0ubuntu1~20.04.1",
"0.62.0ubuntu0libgit2-0ubuntu0.20.04.1",
"0.66.0+ds0ubuntu0.libgit2-0ubuntu0.20.04",
"0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "cargo",
"binary_version": "0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:22.04:LTS",
"name": "cargo",
"purl": "pkg:deb/ubuntu/cargo@0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1?arch=source\u0026distro=esm-apps/jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.52.0-0ubuntu1",
"0.53.0-0ubuntu2",
"0.54.0-0ubuntu1",
"0.54.0-0ubuntu2",
"0.57.0+ubuntu-0ubuntu1",
"0.58.0-0ubuntu1",
"0.60.0ubuntu1-0ubuntu1~22.04.1",
"0.62.0ubuntu0libgit2-0ubuntu0.22.04.1",
"0.66.0+ds0ubuntu0.libgit2-0ubuntu0.22.04",
"0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "librust-cargo+openssl-dev",
"binary_version": "0.57.0-1ubuntu0.1~esm1"
},
{
"binary_name": "librust-cargo-dev",
"binary_version": "0.57.0-1ubuntu0.1~esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:22.04:LTS",
"name": "rust-cargo",
"purl": "pkg:deb/ubuntu/rust-cargo@0.57.0-1ubuntu0.1~esm1?arch=source\u0026distro=esm-apps/jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.57.0-1ubuntu0.1~esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.43.1-4",
"0.57.0-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "librust-cargo-dev",
"binary_version": "0.70.1-2"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "rust-cargo",
"purl": "pkg:deb/ubuntu/rust-cargo@0.70.1-2?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.66.0-5",
"0.66.0-6",
"0.70.1-1",
"0.70.1-2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "cargo",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "libstd-rust-1.71",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rust-all",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rust-clippy",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rust-gdb",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rust-lldb",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rust-src",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rustc",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
},
{
"binary_name": "rustfmt",
"binary_version": "1.71.1+dfsg0ubuntu2-0ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "rustc",
"purl": "pkg:deb/ubuntu/rustc@1.71.1+dfsg0ubuntu2-0ubuntu1?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.71.1+dfsg0ubuntu2-0ubuntu1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": []
}
],
"aliases": [],
"details": "Cargo downloads the Rust project\u2019s 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\u0027s system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.",
"id": "UBUNTU-CVE-2023-38497",
"modified": "2026-04-22T07:45:24Z",
"published": "2023-08-03T12:00:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2023-38497"
},
{
"type": "REPORT",
"url": "https://github.com/alexcrichton/tar-rs/commit/1fd8b4ef309087d138c55aab7b38ad7e15993c96"
},
{
"type": "REPORT",
"url": "https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87"
},
{
"type": "REPORT",
"url": "https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-6275-1"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2023-38497"
}
],
"related": [
"USN-6275-1"
],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2023-38497"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.