CVE Database›Document archive›CVE-2023-38497

CVE-2023-38497

rust-cargo: cargo does not respect the umask when extracting dependencies

Loading…

Severity

Important

Red Hat Product Security

6.7

CVSS 3.1

Review impact separately from score.

Published · August 3, 2023

Updated · February 26, 2026

Description

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.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

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

CVSS / CWE

CVSS 3.1 · 6.7
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

CWE-276 · Incorrect Default Permissions