Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-427 (对搜索路径元素未加控制) — Vulnerability Class 545

545 vulnerabilities classified as CWE-427 (对搜索路径元素未加控制). AI Chinese analysis included.

CWE-427 represents a critical input validation weakness where software relies on an uncontrolled search path to locate resources, allowing unintended actors to manipulate the lookup process. This vulnerability is typically exploited by attackers who place malicious executables or libraries in a directory that precedes legitimate system paths in the search order. When the application executes, it inadvertently loads the attacker-controlled code instead of the intended resource, leading to arbitrary code execution or privilege escalation. Developers mitigate this risk by strictly defining absolute paths for all resource lookups, ensuring that the search order is deterministic and immune to directory manipulation. Additionally, implementing secure environment variable handling and validating the integrity of loaded libraries further prevents attackers from hijacking the execution flow through path traversal techniques.

MITRE CWE Description
The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors. Although this weakness can occur with any type of resource, it is frequently introduced when a product uses a directory search path to find executables or code libraries, but the path contains a directory that can be modified by an attacker, such as "/tmp" or the current working directory. In Windows-based systems, when the LoadLibrary or LoadLibraryEx function is called with a DLL name that does not contain a fully qualified path, the function follows a search order that includes two path elements that might be uncontrolled: the directory from which the program has been loaded the current working directory In some cases, the attack can be conducted remotely, such as when SMB or WebDAV network shares are used. One or more locations in that path could include the Windows drive root or its subdirectories. This often exists in Linux-based code assuming the controlled nature of the root directory (/) or its subdirectories (/etc, etc), or a code that recursively accesses the parent directory. In Windows, the drive root and some of its subdirectories have weak permissions by default, which makes them uncontrolled. In some Unix-based systems, a PATH might be created that contains an empty element, e.g. by splicing an empty variable into the PATH. This empty element can be interpreted as equivalent to the current working directo…
Common Consequences (1)
Confidentiality, Integrity, AvailabilityExecute Unauthorized Code or Commands
Mitigations (5)
Architecture and Design, ImplementationHard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
ImplementationWhen invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code ref…
ImplementationRemove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
ImplementationCheck your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory. Since this is a denylist approach, it might not be a complete solution.
ImplementationUse other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe way to avoid this problem. For example, system() in C does not require a full path since the shell can take care of finding the program using the PATH environment variable, while execl() and execv() require a full path.
Examples (2)
The following code is from a web application that allows users access to an interface through which they can update their password on the system. In this environment, user passwords can be managed using the Network Information System (NIS), which is commonly used on UNIX systems. When performing NIS updates, part of the process for updating passwords is to run a make command in the /var/yp directo…
... System.Runtime.getRuntime().exec("make"); ...
Bad · Java
In versions of Go prior to v1.19, the LookPath function would follow the conventions of the runtime OS and look for a program in the directiories listed in the current path [REF-1325].
func ExecuteGitCommand(name string, arg []string) error { c := exec.Command(name, arg...) var err error c.Path, err = exec.LookPath(name) if err != nil { return err } }
Bad · Go
CVE IDTitleCVSSSeverityPublished
CVE-2021-44206 Local privilege escalation due to DLL hijacking vulnerability in Acronis Media Builder service — Acronis Cyber Protect Home Office 7.3 -2022-02-04
CVE-2021-44205 Local privilege escalation due to DLL hijacking vulnerability — Acronis Cyber Protect Home Office 7.3 -2022-02-04
CVE-2022-0015 Cortex XDR Agent: An Uncontrolled Search Path Element Leads to Local Privilege Escalation (PE) Vulnerability — Cortex XDR Agent 7.8 High2022-01-12
CVE-2022-0129 DLL Highjack vulnerability in McAfee TechCheck utility — McAfee TechCheck 7.4 High2022-01-11
CVE-2021-30360 Enterprise Endpoint Security 代码问题漏洞 — Check Point Remote Access Client 7.8 -2022-01-07
CVE-2021-4007 Rapid7 Insight Agent Privilege Escalation — Insight Agent 7.8 High2021-12-14
CVE-2021-20047 SonicWall Global VPN client 代码问题漏洞 — SonicWall Global VPN Client 7.8 -2021-12-08
CVE-2021-44199 DLL hijacking could lead to denial of service — Acronis Cyber Protect 15 5.5 -2021-11-29
CVE-2021-44198 DLL hijacking could lead to local privilege escalation — Acronis Cyber Protect 15 7.8 -2021-11-29
CVE-2021-3840 Antilles 代码问题漏洞 — Antilles 8.8 High2021-11-12
CVE-2021-31853 MDE DLL Search Order Hijacking vulnerability — McAfee Drive Encryption (MDE) 7.8 High2021-11-10
CVE-2021-38416 Delta Electronics DIALink — DIALink 7.8 High2021-11-03
CVE-2021-38420 Delta Electronics DIALink — DIALink 7.8 High2021-11-03
CVE-2021-30359 Harmony Browse 代码问题漏洞 — Check Point Harmony Browse and SandBlast Agent for Browsers 7.8 -2021-10-22
CVE-2021-38469 AUVESY Versiondog — Versiondog 9.1 Critical2021-10-22
CVE-2021-35982 Adobe Reader DC Windows Installer Uncontrolled Search Path element could lead to Arbitrary Code Execution — Acrobat Reader 7.3 -2021-09-29
CVE-2021-32466 Trend Micro HouseCall for Home Networks 代码问题漏洞 — Trend Micro HouseCall for Home Networks 7.0 -2021-09-29
CVE-2021-36216 LINE for Windows 代码问题漏洞 — LINE for Windows 8.4 -2021-09-08
CVE-2021-28581 Adobe Creative Cloud Desktop uncontrolled search path element vulnerability could lead to local privilege escalation — Creative Cloud (desktop component) 7.3 -2021-09-08
CVE-2021-22775 Schneider Electric GP-Pro EX 代码问题漏洞 — GP-Pro EX V4.09.250 and prior 7.8 -2021-09-02
CVE-2021-28594 Creative Cloud Desktop installer Uncontrolled Search Path element could lead to arbitrary code execution — Prelude 7.8 High2021-08-24
CVE-2021-28636 Adobe Acrobat Reader Unquoted Search Path Vulnerability — Acrobat Reader 7.3 High2021-08-20
CVE-2021-28595 Adobe Dimension Uncontrolled Search Path Element Could Lead To Remote Code Execution — Dimension 7.8 High2021-08-20
CVE-2021-1593 Cisco Packet Tracer for Windows DLL Injection Vulnerability — Cisco Packet Tracer 7.3 High2021-08-04
CVE-2020-5316 DELL Dell SupportAssist for Business PCs和Dell SupportAssist for Home PCs 代码问题漏洞 — Dell SupportAssist Client 7.8 High2021-07-22
CVE-2021-3550 Lenovo Pcmanager 代码问题漏洞 — PCManager 7.8 High2021-07-16
CVE-2021-3042 Cortex XDR Agent: Improper Control of User-Controlled File Leads to Local Privilege Escalation — Cortex XDR Agent 7.8 High2021-07-15
CVE-2021-3613 OpenVPN Connect代码问题漏洞 — OpenVPN Connect 7.3 -2021-07-02
CVE-2021-3606 OpenVPN代码问题漏洞 — OpenVPN-GUI 7.8 -2021-07-02
CVE-2021-28570 Adobe After Effects uncontrolled search path element vulnerability could lead to remote code execution — After Effects 8.3 High2021-06-28

Vulnerabilities classified as CWE-427 (对搜索路径元素未加控制) represent 545 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.