CVE-2022-21658
lowpriority · track · 35EPSS 0.014 · 72 %ileexploit · PoCDEEUNLRUUSEPSS · scored 2026-10-26
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.
remediations
Vendor fix, mitigation, or workaround guidance, as published by each source.
A vendor fix is available.
- FixedSIDIS Primesiemens_psirt
Update to V4.0.700 or later version
- FixedSIDIS Primecisa_csaf_ot
Update to V4.0.700 or later version
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–critical · 3.3–9.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (1)
Public proof-of-concept and weaponised exploit code.
- sagittarius-a/cve-2022-21658POC for cve-2022-21658PoC · poc_in_github
affected products (120)
Products and version ranges known to be affected.
advisories (4)
Vendor and ecosystem advisories describing this.
- NCSC-2025-0106Kwetsbaarheden verholpen in Siemens productenNL2025-04-08csaf · ncsc_nlNL
Siemens heeft kwetsbaarheden verholpen in diverse producten als Industrial Edge Devices, Mendix, SENTRON, SIDIS, SIMATIC, SIPLUS,Insights Hub Private Cloud, Siemens License Server en Solid Edge.
- SSA-277137SSA-277137: Multiple Vulnerabilities in SIDIS Prime Before V4.0.7002025-04-08csaf · siemens_psirtDE
SIDIS Prime before V4.0.700 is affected by multiple vulnerabilities in the components OpenSSL, SQLite, Boost C++ Libraries and several Microsoft components as described below. Siemens has released a new version of SIDIS Prime and recommends to update to the latest version.
- WID-SEC-W-2023-0561Xerox FreeFlow Print Server: Mehrere SchwachstellenDeutsch2023-03-02csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Xerox FreeFlow Print Server ausnutzen, um die Vertraulichkeit, Verfügbarkeit und Integrität des Systems zu gefährden.
- ICSA-25-100-02Siemens SIDIS Prime2025-04-08icsa · cisa_csaf_otUS
SIDIS Prime before V4.0.700 is affected by multiple vulnerabilities in the components OpenSSL, SQLite, Boost C++ Libraries and several Microsoft components as described below. Siemens has released a new version of SIDIS Prime and recommends to update to the latest version.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (53)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2022-21658cnnvd
- https://blog.rust-lang.org/2022/01/20/cve-2022-21658.htmlcnnvd
- https://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946cnnvd
- https://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abafcnnvd
- https://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714cnnvd
- https://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan