CVE-2023-38497

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-38497
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-38497.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-38497
Aliases
Downstream
Related
Published
2023-08-04T15:51:44.878Z
Modified
2025-11-15T06:43:26.960358Z
Severity
  • 7.9 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N CVSS Calculator
Summary
Cargo not respecting umask when extracting crate archives
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-278"
    ]
}
References

Affected packages

Git / github.com/rust-lang/cargo

Affected ranges

Type
GIT
Repo
https://github.com/rust-lang/cargo
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.1.0
0.10.0
0.11.0
0.12.0
0.13.0
0.14.0
0.2.0
0.3.0
0.30.0
0.36.0
0.37.0
0.4.0
0.42.0
0.43.0
0.5.0
0.54.0
0.59.0
0.6.0
0.7.0
0.72.0
0.72.1
0.8.0
0.9.0

home-0.*

home-0.5.4
home-0.5.5

v0.*

v0.0.1-pre