Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. The Rust Security Response WG was notified that the `std::fs::remove_dir_all` standard library function is vulnerable a race condition enabling symlink following (CWE-363). An attacker could use this security issue to trick a privileged program into deleting files and directories the attacker couldn't otherwise access or delete. Rust 1.0.0 through Rust 1.58.0 is affected by this vulnerability with 1.58.1 containing a patch. Note that the following build targets don't have usable APIs to properly mitigate the attack, and are thus still vulnerable even with a patched toolchain: macOS before version 10.10 (Yosemite) and REDOX. We recommend everyone to update to Rust 1.58.1 as soon as possible, especially people developing programs expected to run in privileged contexts (including system daemons and setuid binaries), as those have the highest risk of being affected by this. Note that adding checks in your codebase before calling remove_dir_all will not mitigate the vulnerability, as they would also be vulnerable to race conditions like remove_dir_all itself. The existing mitigation is working as intended outside of race conditions.
CVSS Details
- CVSS 3.1 Base Score: 7.3
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alma_linux | — | Upgrade rust-docUpgrade rust-toolsetUpgrade rust-srcUpgrade rust-std-static-wasm32-unknown-unknownUpgrade cargo-docUpgrade clippyUpgrade cargoUpgrade rlsUpgrade rust-gdbUpgrade rust-analysisUpgrade rust-std-static-wasm32-wasiUpgrade rustUpgrade rustfmtUpgrade rust-std-staticUpgrade rust-lldbUpgrade rust-debugger-common | May 13, 2022 | Jan 20, 2022 |
| Amazon Linux Ami 2 | — | Upgrade rustfmtUpgrade rust-debugger-commonUpgrade rust-docUpgrade rustUpgrade rust-std-staticUpgrade rust-srcUpgrade rust-debuginfoUpgrade rlsUpgrade cargoUpgrade cargo-docUpgrade clippyUpgrade rust-analysisUpgrade rust-gdb | Sep 30, 2022 | Jan 20, 2022 |
| Apple Osx Llvm | — | Upgrade macOS to the latest version | May 26, 2022 | Jan 20, 2022 |
| Centos_linux | — | Upgrade rlsUpgrade rust-toolsetUpgrade rust-analysisUpgrade cargo-docUpgrade rustUpgrade rust-lldbUpgrade rust-debugsourceUpgrade rls-debuginfoUpgrade clippy-debuginfoUpgrade cargoUpgrade rust-std-static-wasm32-unknown-unknownUpgrade rust-std-staticUpgrade rust-gdbUpgrade clippyUpgrade rust-debuginfoUpgrade rustfmt-debuginfoUpgrade rust-docUpgrade rust-std-static-wasm32-wasiUpgrade rust-debugger-commonUpgrade rust-srcUpgrade cargo-debuginfoUpgrade rustfmt | May 13, 2022 | Jan 20, 2022 |
| Debian | — | Upgrade rustc | Jul 30, 2024 | Jan 20, 2022 |
| Freebsd | — | Upgrade rustUpgrade rust-nightly | Nov 4, 2022 | Jan 31, 2022 |
| Gentoo Linux | — | Upgrade dev-lang/rust.Upgrade dev-lang/rust-bin. | Oct 17, 2022 | Jan 20, 2022 |
| Oracle_linux | — | Upgrade cargo-docUpgrade rust-lldbUpgrade rust-srcUpgrade rustfmtUpgrade rust-analysisUpgrade rust-docUpgrade rust-debugger-commonUpgrade rlsUpgrade rust-toolsetUpgrade rust-std-staticUpgrade rust-gdbUpgrade clippyUpgrade cargoUpgrade rust-std-static-wasm32-wasiUpgrade rust-std-static-wasm32-unknown-unknownUpgrade rust | May 18, 2022 | Jan 20, 2022 |
| Redhat_linux | — | Upgrade rustfmtUpgrade clippyUpgrade cargo-docUpgrade rls-debuginfoUpgrade rust-std-staticUpgrade rustfmt-debuginfoUpgrade rust-analysisUpgrade rust-srcUpgrade rust-docUpgrade cargoUpgrade rust-debugger-commonUpgrade rustUpgrade rust-debuginfoUpgrade clippy-debuginfoUpgrade rust-std-static-wasm32-wasiUpgrade cargo-debuginfoNo solution existsUpgrade rust-lldbUpgrade rlsUpgrade rust-gdbUpgrade rust-debugsourceUpgrade rust-toolsetUpgrade rust-std-static-wasm32-unknown-unknown | May 13, 2022 | Jan 20, 2022 |
| Rocky_linux | — | Upgrade rls-debuginfoUpgrade rust-std-staticUpgrade rustfmtUpgrade rust-analysisUpgrade rust-debuginfoUpgrade cargoUpgrade rust-debugsourceUpgrade rust-toolsetUpgrade clippyUpgrade cargo-debuginfoUpgrade rust-std-static-wasm32-unknown-unknownUpgrade rustfmt-debuginfoUpgrade rust-std-static-wasm32-wasiUpgrade rlsUpgrade clippy-debuginfoUpgrade rust-docUpgrade rust | Mar 5, 2024 | Jan 20, 2022 |
| Suse | — | Upgrade cargo1.59Upgrade rustUpgrade rust-srcUpgrade cargo1.57Upgrade cargo1.58Upgrade cargo1.55Upgrade rust-analysisUpgrade cargo-docUpgrade rust1.57Upgrade rust1.59Upgrade rust1.58Upgrade rust-gdbUpgrade rlsUpgrade rust1.55Upgrade rust1.56Upgrade cargo1.56Upgrade cargoUpgrade rust-doc | Jan 22, 2022 | Jan 20, 2022 |
| Ubuntu | — | Upgrade rustc | Nov 19, 2024 | Jan 20, 2022 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jan 20, 2025 | Jan 20, 2022 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub