CVE-2023-38497
Security vulnerability in cargo
How to Fix This Vulnerability
Upgrade to a fixed version
Remediation Steps
- 1Upgrade the package to version 0.72.2 or later
- 2Review and audit affected systems for potential exploitation
- 3Implement additional security controls if immediate patching is not possible
- 4Monitor for suspicious activity related to this vulnerability
Mitigation Strategies
- Immediate PatchingHigh
Apply security patches to version 0.72.2 immediately
- Network SegmentationHigh
Isolate affected systems from untrusted networks until patching is complete
- Monitoring and DetectionMedium
Implement enhanced monitoring for exploitation attempts and unusual behavior
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.
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. This vulnerability involves weaknesses in
Impact Assessment
This high-severity vulnerability could allow attackers to gain unauthorized access, execute arbitrary code, or compromise data integrity. Prompt remediation is strongly recommended.
Attack Characteristics
- Attack Vector
- LOCAL
- Complexity
- LOW
- Privileges Required
- LOW
- User Interaction
- REQUIRED
CVSS v3.1 Metrics Breakdown
- attack Vector
- LOCAL
- attack Complexity
- LOW
- privileges Required
- LOW
- user Interaction
- REQUIRED
- scope
- Unchanged
- confidentiality Impact
- High
- integrity Impact
- High
- availability Impact
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:NVulnerability Timeline
- 2023-08-04T16:15:10.370Vulnerability publishedpublished
- 2023-08-04T16:15:10.370Patches released: 0.72.2patched