Vulnerability
CVE-2023-38497
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`.
24 advisories report this vulnerability, across 13 ecosystems.
Advisories
-
ALAS2-2023-2223
Amazon Linux 2 2017.12 - ALAS2-2023-2223: important priority package update for rust
-
ALAS2023-2023-323
Amazon Linux 2023 - ALAS2023-2023-323: Important priority package update for rust
-
ALPINE-CVE-2023-38497
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…
- ALPINE-EDGE-CVE-2023-38497
-
ALSA-2023:4634
Important: rust security update
-
ALSA-2023:4635
Important: rust-toolset:rhel8 security update
-
AZL-28510
CVE-2023-38497 affecting package rust for versions less than 1.72.0-2
-
DEBIAN-CVE-2023-38497
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…
-
ELSA-2023-4634
ELSA-2023-4634: rust security update (IMPORTANT)
-
ELSA-2023-4635
ELSA-2023-4635: rust-toolset:ol8 security update (IMPORTANT)
-
GHSA-j3xp-wfr4-hx87
Cargo not respecting umask when extracting crate archives
-
OESA-2025-1236
rust security update
-
OESA-2025-1237
rust security update
-
RHSA-2023:4634
Red Hat Security Advisory: rust security update
-
RHSA-2023:4635
Red Hat Security Advisory: rust-toolset:rhel8 security update
-
RHSA-2023:4651
Red Hat Security Advisory: rust-toolset-1.66-rust security update
-
RHSA-2024:3418
Red Hat Security Advisory: rust security update
-
RHSA-2024:3428
Red Hat Security Advisory: rust-toolset:rhel8 security update
-
RLSA-2023:4634
Important: rust security update
-
RLSA-2023:4635
Important: rust-toolset:rhel8 security update
-
SUSE-SU-2023:3251-1
Security update for rust1.71
-
UBUNTU-CVE-2023-38497
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…
-
USN-6275-1
cargo, rust-cargo vulnerability
-
openSUSE-SU-2024:13101-1
cargo1.71-1.71.1-1.1 on GA media
References
- https://en.wikipedia.org/wiki/Umask
- https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff
- https://github.com/rust-lang/cargo/pull/12443
- https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/
- https://www.rust-lang.org/policies/security