CVE-2023-38497
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
cargocrates.io | < 0.72.2 | 0.72.2 |
Affected products
22- ghsa-coords21 versionspkg:cargo/cargopkg:rpm/almalinux/cargopkg:rpm/almalinux/clippypkg:rpm/almalinux/rustpkg:rpm/almalinux/rust-analysispkg:rpm/almalinux/rust-analyzerpkg:rpm/almalinux/rust-debugger-commonpkg:rpm/almalinux/rust-docpkg:rpm/almalinux/rustfmtpkg:rpm/almalinux/rust-gdbpkg:rpm/almalinux/rust-lldbpkg:rpm/almalinux/rust-srcpkg:rpm/almalinux/rust-std-staticpkg:rpm/almalinux/rust-std-static-wasm32-unknown-unknownpkg:rpm/almalinux/rust-std-static-wasm32-wasipkg:rpm/almalinux/rust-toolsetpkg:rpm/opensuse/rust1.71&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/rust1.71&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/rust1.71&distro=openSUSE%20Tumbleweedpkg:rpm/suse/rust1.71&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP4pkg:rpm/suse/rust1.71&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP5
< 0.72.2+ 20 more
- (no CPE)range: < 0.72.2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.66.1-2.el9_2
- (no CPE)range: < 1.71.1-150400.9.6.1
- (no CPE)range: < 1.71.1-150400.9.6.1
- (no CPE)range: < 1.71.1-1.1
- (no CPE)range: < 1.71.1-150400.9.6.1
- (no CPE)range: < 1.71.1-150400.9.6.1
- rust-lang/cargov5Range: < 0.72.2
Patches
Vulnerability mechanics
References
12- github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ffnvdPatchWEB
- github.com/rust-lang/cargo/pull/12443nvdMailing ListPatchWEB
- github.com/advisories/GHSA-j3xp-wfr4-hx87ghsaADVISORY
- github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87nvdVendor AdvisoryWEB
- github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497nvdThird Party AdvisoryWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/nvdMailing ListThird Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2023-38497ghsaADVISORY
- en.wikipedia.org/wiki/UmasknvdNot ApplicableWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4ghsaWEB
- www.rust-lang.org/policies/securitynvdProductWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/nvd
News mentions
0No linked articles in our index yet.