https://seclists.org/oss-sec/2023/q3/90: CVE-2023-38497: Cargo does not respect umask when extracting packages

Published Aug 3, 2023
·
Updated

Affected Software

1 affected component
Rust Cargo

Frequently Asked Questions

1

Who can exploit this issue?

A local user who can modify extracted crate files that Cargo made writable can alter source code before it is compiled and executed by the Cargo user. The issue is relevant on UNIX-like systems where multiple local users share access to the affected cache files.

2

Does a typical default umask prevent exploitation?

The default umask on macOS and most Linux distributions normally removes group and other write permissions from newly created files. Cargo did not respect that umask when extracting crate archives, so protection depends on the permissions stored in the downloaded crate rather than the user's normal umask.

3

When does the risky file extraction occur?

Cargo extracts a dependency when it is first used and caches the extracted files for later invocations. A malicious local user would need an opportunity to modify a writable extracted file before the Cargo user's source is compiled and executed.

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203