7.9
CWE
278 732 276
Advisory Published
CVE Published
Advisory Published
CVE Published
Updated

CVE-2023-38497: Cargo not respecting umask when extracting crate archives

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 SoftwareAffected VersionHow 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

Remedy

We recommend configuring your system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is the vulnerability ID for this issue?

    The vulnerability ID for this issue is CVE-2023-38497.

  • What is the severity of CVE-2023-38497?

    CVE-2023-38497 has a severity value of 7.9 (high).

  • What is the affected software for CVE-2023-38497?

    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.

  • How can I fix CVE-2023-38497?

    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.

  • Where can I find more information about CVE-2023-38497?

    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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203