#VU59898 Race condition in Rust Programming Language


Published: 2022-01-23

Vulnerability identifier: #VU59898

Vulnerability risk: High

CVSSv3.1: 8.8 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: CVE-2022-21658

CWE-ID: CWE-362

Exploitation vector: Network

Exploit availability: Yes

Vulnerable software:
Rust Programming Language
Universal components / Libraries / Programming Languages & Components

Vendor: 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.

Mitigation
Install updates from vendor's website.

Vulnerable software versions

Rust Programming Language: 1.0.0 - 1.58.0


External links
http://github.com/rust-lang/rust/pull/93110
http://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946
http://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf
http://blog.rust-lang.org/2022/01/20/cve-2022-21658.html
http://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714
http://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.


Latest bulletins with this vulnerability