CVE-2022-21658
Apachearsi Directory Symlink Following
Description
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.
INFO
Published Date :
Jan. 20, 2022, 6:15 p.m.
Last Modified :
Nov. 21, 2024, 6:45 a.m.
Source :
[email protected]
Remotely Exploitable :
No
Impact Score :
4.7
Exploitability Score :
2.0
Public PoC/Exploit Available at Github
CVE-2022-21658 has a 12 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
Affected Products
The following products are affected by CVE-2022-21658
vulnerability.
Even if cvefeed.io
is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2022-21658
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
All CVE - PoC in GitHub
poc proofofconcept tester allcve cvegithub cvenew cvepoc cveupdate
None
None
None
None
None
A simple programm, inteneded to replace "rm" and "rmdir" by combining their features in single executable.
rust-lang cargo rustc cli rust windows-cli linux-cli wsl2 wsl-ubuntu ubuntu ubuntu2004
POC for cve-2022-21658
rust cve-2022-21658 poc
Rust
test 反向辣鸡数据投放 CVE-2022-23305 工具 利用 教程 Exploit POC
cve-2020-
本项目用于搜集 2022 年的漏洞,注意:本项目并不刻意搜集 POC 或 EXP,主要以CVE-2021、CVE-2022 为关键词,包含但不限于漏洞资讯、漏洞复现、漏洞分析、漏洞验证、漏洞利用
Customizable subcommands to build your Wasm projects using xtask.
Rust
Rust语言安全相关分析
rust rust-sec rust-security fuzz rust-crate
Rust
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2022-21658
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2022-21658
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html Added Reference https://github.com/rust-lang/rust/pull/93110 Added Reference https://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946 Added Reference https://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf Added Reference https://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714 Added Reference https://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2 Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ Added Reference https://security.gentoo.org/glsa/202210-09 Added Reference https://support.apple.com/kb/HT213182 Added Reference https://support.apple.com/kb/HT213183 Added Reference https://support.apple.com/kb/HT213186 Added Reference https://support.apple.com/kb/HT213193 -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Nov. 07, 2023
Action Type Old Value New Value Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ [No types assigned] Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ -
Modified Analysis by [email protected]
Oct. 19, 2022
Action Type Old Value New Value Changed Reference Type https://security.gentoo.org/glsa/202210-09 No Types Assigned https://security.gentoo.org/glsa/202210-09 Third Party Advisory Changed Reference Type https://support.apple.com/kb/HT213182 No Types Assigned https://support.apple.com/kb/HT213182 Third Party Advisory Changed Reference Type https://support.apple.com/kb/HT213183 No Types Assigned https://support.apple.com/kb/HT213183 Third Party Advisory Changed Reference Type https://support.apple.com/kb/HT213186 No Types Assigned https://support.apple.com/kb/HT213186 Third Party Advisory Changed Reference Type https://support.apple.com/kb/HT213193 No Types Assigned https://support.apple.com/kb/HT213193 Third Party Advisory Added CPE Configuration OR *cpe:2.3:o:apple:ipados:*:*:*:*:*:*:*:* versions up to (excluding) 15.4 *cpe:2.3:o:apple:iphone_os:*:*:*:*:*:*:*:* versions up to (excluding) 15.4 *cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:* versions from (including) 12.0.0 up to (excluding) 12.3 *cpe:2.3:o:apple:tvos:*:*:*:*:*:*:*:* versions up to (excluding) 15.4 *cpe:2.3:o:apple:watchos:*:*:*:*:*:*:*:* versions up to (excluding) 8.5 -
CVE Modified by [email protected]
Oct. 16, 2022
Action Type Old Value New Value Added Reference https://security.gentoo.org/glsa/202210-09 [No Types Assigned] -
CVE Modified by [email protected]
May. 26, 2022
Action Type Old Value New Value Added Reference https://support.apple.com/kb/HT213183 [No Types Assigned] Added Reference https://support.apple.com/kb/HT213182 [No Types Assigned] Added Reference https://support.apple.com/kb/HT213193 [No Types Assigned] Added Reference https://support.apple.com/kb/HT213186 [No Types Assigned] -
Modified Analysis by [email protected]
Mar. 25, 2022
Action Type Old Value New Value Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ Mailing List, Third Party Advisory -
CVE Modified by [email protected]
Feb. 14, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/7JKZDTBMGAWIFJSNWKBMPO5EAKRR4BEW/ [No Types Assigned] -
CVE Modified by [email protected]
Feb. 09, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/CKGTACKMKAPRDPWPTU26GYWBELIRFF5N/ [No Types Assigned] -
Initial Analysis by [email protected]
Jan. 31, 2022
Action Type Old Value New Value Added CVSS V2 NIST (AV:L/AC:M/Au:N/C:N/I:P/A:P) Added CVSS V3.1 NIST AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H Changed Reference Type https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html No Types Assigned https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html Exploit, Mitigation, Vendor Advisory Changed Reference Type https://github.com/rust-lang/rust/pull/93110 No Types Assigned https://github.com/rust-lang/rust/pull/93110 Patch, Third Party Advisory Changed Reference Type https://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946 No Types Assigned https://github.com/rust-lang/rust/pull/93110/commits/32ed6e599bb4722efefd78bbc9cd7ec4613cb946 Patch, Third Party Advisory Changed Reference Type https://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf No Types Assigned https://github.com/rust-lang/rust/pull/93110/commits/406cc071d6cfdfdb678bf3d83d766851de95abaf Patch, Third Party Advisory Changed Reference Type https://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714 No Types Assigned https://github.com/rust-lang/rust/pull/93110/commits/4f0ad1c92ca08da6e8dc17838070975762f59714 Patch, Third Party Advisory Changed Reference Type https://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2 No Types Assigned https://github.com/rust-lang/rust/security/advisories/GHSA-r9cc-f5pr-p3j2 Exploit, Mitigation, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ Mailing List, Third Party Advisory Added CWE NIST CWE-367 Added CPE Configuration OR *cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:* versions from (including) 1.0.0 up to (including) 1.58.0 Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* -
CVE Modified by [email protected]
Jan. 25, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/BK32QZLHDC2OVLPKTUHNT2G3VHWHD4LX/ [No Types Assigned] Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/C63NH72Q7UHJM5V3IVYRI7LVBGGFQMSQ/ [No Types Assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2022-21658
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2022-21658
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.09 }} 0.02%
score
0.36981
percentile