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

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`.

Published: 2023-08-04 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-38497 is rated Moderate Risk (63.1/100): CVSS High severity, with high exploitation likelihood (EPSS 5.66%, 90th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-38497

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-25 5.80% 5.66% -0.15%
2 2026-05-22 5.66% 5.80% +0.15%
3 2026-03-04 5.66%

Full EPSS history (46 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-38497

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.9 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.5 5.8 [email protected]
7.3 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.3 5.9 [email protected]

Weakness enumeration for CVE-2023-38497

GitHub Security Advisory for CVE-2023-38497

GHSA-j3xp-wfr4-hx87 · Severity: high · Ecosystem: rust — Cargo not respecting umask when extracting crate archives

OS Trackers for CVE-2023-38497

vendor priority summary link
alpine high CVE-2023-38497: 1 source package rows (rust); 6 state rows across 6 repos (3.18-community, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 6, open 0. https://security.alpinelinux.org/vuln/CVE-2023-38497
debian not yet assigned CVE-2023-38497 not yet assigned priority: Debian including 2 source packages (cargo, rust-cargo), 7 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): open 4, resolved 3. https://security-tracker.debian.org/tracker/CVE-2023-38497
gentoo normal CVE-2023-38497: 1 GLSA(s) (202409-07), 2 atom(s) (dev-lang/rust, dev-lang/rust-bin); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-38497
redhat high https://access.redhat.com/security/cve/CVE-2023-38497
suse medium CVE-2023-38497 severity moderate: SUSE including 44 source package names (cargo, cargo-1.66.1-2.el9_2, …), 141 product×package rows across 24 product lines (SUSE CaaS Platform 4.0, SUSE Enterprise Storage 7.1, … (24 product lines)): Will Not Fix 69, Fixed 46, Known Not Affected 26. https://www.suse.com/security/cve/CVE-2023-38497/
ubuntu medium CVE-2023-38497 medium priority: Ubuntu including 3 source packages (cargo, rust-cargo, rustc), 36 status rows across 12 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 9, not-affected 9, released 9, ignored 8, needed 1. https://ubuntu.com/security/CVE-2023-38497

Affected software / configurations for CVE-2023-38497

Vendor Product Version Raw CPE
rust-lang cargo < 0.72.2 cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*
fedoraproject fedora 38 cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*

References for CVE-2023-38497

cvelogic Threat Intelligence