CVE-2023-38497
CVE-2023-38497 is a high-severity vulnerability in Rust-lang Cargo with a CVSS 3.x base score of 7.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-732.
Key facts
- Severity: High (CVSS 3.x base score 7.9)
- EPSS exploit prediction: 1% (51st percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-732
- Affected product: Rust-lang Cargo
- Published:
- Last modified:
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`.
Frequently asked questions
- What is CVE-2023-38497?
- 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`.
- How severe is CVE-2023-38497?
- CVE-2023-38497 has a CVSS 3.x base score of 7.9, rated high severity. It is exploitable over local access with low attack complexity, requires low privileges and user interaction. Impact on confidentiality is high, integrity high, and availability none.
- Is CVE-2023-38497 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (51st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-38497?
- CVE-2023-38497 primarily affects Rust-lang Cargo. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2023-38497?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2023-38497 published?
- CVE-2023-38497 was published on 2023-08-04 and last updated on 2026-06-17.
References
- https://en.wikipedia.org/wiki/Umask
- https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff
- https://github.com/rust-lang/cargo/pull/12443
- https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87
- https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/
- https://www.rust-lang.org/policies/security
Affected products (2)
- cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
More vulnerabilities in Rust-lang Cargo
- CVE-2026-5222 — Medium (CVSS 6.5): Cargo between 1.68 and 1.96 incorrectly normalized the URLs of third-party registries using the sparse index protocol.…
- CVE-2026-5223 — Medium (CVSS 5.3): Cargo incorrectly handled symlinks inside of crate tarballs downloaded from third-party registries, allowing a…
- CVE-2022-46176 — Medium (CVSS 5.3): Cargo is a Rust package manager. The Rust Security Response WG was notified that Cargo did not perform SSH host key…
- CVE-2022-36114 — Medium (CVSS 4.8): Cargo is a package manager for the rust programming language. It was discovered that Cargo did not limit the amount of…
- CVE-2022-36113 — Medium (CVSS 4.6): Cargo is a package manager for the rust programming language. After a package is downloaded, Cargo extracts its source…
All CVEs affecting Rust-lang Cargo →
Other CWE-732 (Incorrect Permission Assignment for Critical Resource) vulnerabilities
- CVE-2026-9508 — Critical (CVSS 10.0): Incorrect permission settings on a critical resource in Suprema BioStar 2 (versions 2.9.3 through 2.9.11) that allow…
- CVE-2025-14988 — Critical (CVSS 10.0): A security issue has been identified in ibaPDA that could allow unauthorized actions on the file system under certain…
- CVE-2025-69426 — Critical (CVSS 10.0): The Ruckus vRIoT IoT Controller firmware versions prior to 3.0.0.0 (GA) contain hardcoded credentials for an operating…
- CVE-2025-12004 — Critical (CVSS 10.0): Incorrect Permission Assignment for Critical Resource vulnerability in The Wikimedia Foundation Mediawiki - Lockdown…
- CVE-2014-125121 — Critical (CVSS 10.0): Array Networks vAPV (version 8.3.2.17) and vxAG (version 9.2.0.34) appliances are affected by a privilege escalation…
- CVE-2025-46093 — Critical (CVSS 9.9): LiquidFiles before 4.1.2 supports FTP SITE CHMOD for mode 6777 (setuid and setgid), which allows FTPDrop users to…
Browse all CWE-732 (Incorrect Permission Assignment for Critical Resource) vulnerabilities →