#VU59898 Race condition in Rust Programming Language - CVE-2022-21658
Published: January 21, 2022 / Updated: January 23, 2022
Vulnerability identifier: #VU59898
Vulnerability risk: High
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Amber
CVE-ID: CVE-2022-21658
CWE-ID: CWE-362
Exploitation vector: Remote access
Exploit availability:
Public exploit is available
Vulnerable software:
Rust Programming Language
Rust Programming Language
Software vendor:
Rust Team
Rust Team
Description
The vulnerability allows a remote attacker to escalate privileges on the system.
The vulnerability exists due to a race condition in std::fs::remove_dir_all. A remote attacker can exploit the race, escalate privileges and delete arbitrary files on the system.
Remediation
Install updates from vendor's website.
External links
- https://github.com/rust-lang/rust/pull/93110
- https://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946
- https://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf
- https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html
- https://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714
- https://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2