Home / rust-lang / cargo / CVE-2023-38497
CVE-2023-38497: is it exploited, and which versions of rust-lang cargo are affected and fixed?
CVE-2023-38497 is an insecure Preserved Inherited Permissions vulnerability in rust-lang cargo. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:39 UTC). Affected: cargo before 0.72.2 (GitHub advisory GHSA-j3xp-wfr4-hx87). Fixed in 0.72.2 (GitHub advisory GHSA-j3xp-wfr4-hx87). Severity: High (7.8, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:39 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:37 UTC.
What is 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`.
From the CVE record by GitHub_M, last updated February 13, 2025, 17:01 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| rust-lang | cargo | < 0.72.2 |
As the CVE record by GitHub_M states it, last updated February 13, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| crates.io | cargo | < 0.72.2 | 0.72.2 | GHSA-j3xp-wfr4-hx87 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated August 3, 2023. Summary: Cargo not respecting umask when extracting crate archives.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| rust-lang | cargo | before 0.72.2 | application |
| fedoraproject | fedora | 38 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 06:10 UTC.
How severe is CVE-2023-38497?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.8 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N | GitHub_M |
| High 7.3 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2023-38497 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, October 8, 2024)
- EPSS
- 0.70% probability of exploitation activity in the next 30 days, percentile 54.6 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-278 Insecure Preserved Inherited Permissions
- CWE-732 Incorrect Permission Assignment for Critical Resource
Where are the vendor advisories and references?
- https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87 x_refsource_CONFIRM
- https://github.com/rust-lang/cargo/pull/12443 x_refsource_MISC
- https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff x_refsource_MISC
- https://en.wikipedia.org/wiki/Umask x_refsource_MISC
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497 x_refsource_MISC
- https://www.rust-lang.org/policies/security x_refsource_MISC
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/
When was it published, and where is the official record?
- Reserved
- July 18, 2023
- Published
- August 4, 2023, 15:51 UTC
- CVE record updated
- February 13, 2025, 17:01 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 06:10 UTC
- Last checked
- CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:37 UTC; KEV December 3, 2026, 17:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect cargo?
- Aug 24, 2023CVE-2023-40030 rust-lang cargo: cross-site scripting (XSS)
- Jan 11, 2023CVE-2022-46176 rust-lang cargo: cryptographic signature not verified
- Sep 14, 2022CVE-2022-36114 rust-lang cargo: denial of service (uncontrolled resource consumption)
- Sep 14, 2022CVE-2022-36113 rust-lang cargo: path traversal (reading or writing files outside the intended folder)
Questions about CVE-2023-38497
Is CVE-2023-38497 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:39 UTC. FIRST's EPSS gives it a 0.70% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of rust-lang cargo are affected by CVE-2023-38497?
cargo before 0.72.2, per the GitHub advisory GHSA-j3xp-wfr4-hx87. The tables above give every range the sources list.
Which version fixes CVE-2023-38497?
0.72.2, per the GitHub advisory GHSA-j3xp-wfr4-hx87. Check the vendor's advisory before you rely on it.
How severe is CVE-2023-38497?
High (7.8, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2023-38497?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.