CVE-2023-38497Cargo not respecting umask when extracting crate archives
- 7.8HighCVSS base score
- 0.70%Exploitation in 30 daysEPSS · top 46% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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`.
Timeline
ID reserved
By GitHub_M
- 17 days later
· 17 days later
Published
- 19 months later
· 19 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVDNVD · Modified | 3.1 | High7.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.70% · top 46% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.8.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- crates.iocargoGHSA-j3xp-wfr4-hx87 (opens in a new tab)
References
References8
- https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/rust-lang/cargo/pull/12443 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff (opens in a new tab)x_refsource_MISCx_transferred
- https://en.wikipedia.org/wiki/Umask (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497 (opens in a new tab)x_refsource_MISCx_transferred
- https://www.rust-lang.org/policies/security (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/ (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/ (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-2308 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-j3xp-wfr4-hx87 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-38497)Record last updated .