First published: Tue Aug 01 2023(Updated: )
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.
Credit: security-advisories@github.com security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
Rust-lang Cargo | <0.72.2 | |
Fedoraproject Fedora | =38 | |
redhat/rust-toolset | <1.66-rust-0:1.66.1-2.el7_9 | 1.66-rust-0:1.66.1-2.el7_9 |
redhat/rust | <0:1.66.1-2.el9_2 | 0:1.66.1-2.el9_2 |
rust/cargo | <=0.72.1 | 0.72.2 |
ubuntu/rust-cargo | <0.57.0-1ubuntu0.1~ | 0.57.0-1ubuntu0.1~ |
ubuntu/cargo | <0.72.2 | 0.72.2 |
ubuntu/cargo | <0.66.0+ | 0.66.0+ |
ubuntu/cargo | <0.67.1+ | 0.67.1+ |
ubuntu/cargo | <0.67.1+ | 0.67.1+ |
ubuntu/cargo | <0.47.0-1~ | 0.47.0-1~ |
redhat/rust | <1.71.1 | 1.71.1 |
debian/cargo | <=0.43.1-3~deb10u1<=0.47.0-3<=0.66.0+ds1-1<=0.70.1+ds1-2 | |
debian/rust-cargo | <=0.32.0-2<=0.43.1-4<=0.66.0-1<=0.70.1-2 |
We recommend configuring your system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)
The vulnerability ID for this issue is CVE-2023-38497.
CVE-2023-38497 has a severity value of 7.9 (high).
The affected software for CVE-2023-38497 includes rust-cargo versions 0.57.0-1ubuntu0.1~ to 0.72.2, cargo versions 0.47.0-1~ to 0.67.1+ and 0.72.2, and Rust-lang Cargo versions up to 0.72.2.
To fix CVE-2023-38497, update the affected software to a version that includes the fix. Refer to the official sources, such as the Rust-lang website.
You can find more information about CVE-2023-38497 on the official GitHub page for the Rust-lang Cargo project, Wikipedia page about umask, and the Rust-lang website's security policies.