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-2024-47195 Siemens ModelSim和Questa 代码问题漏洞 — ModelSim 6.7 Medium2024-10-08
CVE-2024-47194 Siemens ModelSim 代码问题漏洞 — ModelSim 6.7 Medium2024-10-08
CVE-2024-45246 Diebold Nixdorf – CWE-427: Uncontrolled Search Path Element — Vynamic View prior to v5.9.5 7.3 High2024-10-06
CVE-2024-8766 Acronis Cyber Protect 代码问题漏洞 — Acronis Cyber Protect Cloud Agent 7.8 -2024-09-16
CVE-2024-34016 Acronis Cyber Protect 代码问题漏洞 — Acronis Cyber Protect Cloud Agent 7.8 -2024-09-16
CVE-2024-39613 RCE in desktop app in Windows by local attacker — Mattermost 5.3 Medium2024-09-16
CVE-2024-20430 Cisco Meraki Systems Manager Agent for Windows Privilege Escalation Vulnerability — Cisco Meraki Systems Manager Agent 7.3 High2024-09-12
CVE-2024-8441 Ivanti EPM 安全漏洞 — Endpoint Manager 6.7 Medium2024-09-10
CVE-2024-44107 Ivanti Workspace Control 安全漏洞 — Workspace Control 8.8 High2024-09-10
CVE-2024-7834 Local privilege escalation in Overwolf — Overwolf 7.8 High2024-09-04
CVE-2024-34017 Acronis Snap Deploy 代码问题漏洞 — Acronis Snap Deploy 7.8AIHighAI2024-08-29
CVE-2024-34019 Acronis Snap Deploy 代码问题漏洞 — Acronis Snap Deploy 7.8AIHighAI2024-08-29
CVE-2024-5929 VIPRE Advanced Security PMAgent Uncontrolled Search Path Element Local Privilege Escalation Vulnerability — Advanced Security 7.8AIHighAI2024-08-21
CVE-2024-7886 Scooter Software Beyond Compare 7zxa.dll uncontrolled search path — Beyond Compare 7.8 High2024-08-16
CVE-2024-5290 wpa_supplicant 安全漏洞 — wpa_supplicant 8.8 High2024-08-07
CVE-2024-7326 IObit DualSafe Password Manager BPL RTL120.BPL uncontrolled search path — DualSafe Password Manager 7.8 High2024-07-31
CVE-2024-7325 IObit Driver Booster BPL VCL120.BPL uncontrolled search path — Driver Booster 7.8 High2024-07-31
CVE-2024-7324 IObit iTop Data Recovery Pro BPL madbasic_.bpl uncontrolled search path — iTop Data Recovery Pro 7.8 High2024-07-31
CVE-2024-32857 Dell Peripheral Manager 代码问题漏洞 — Dell Peripheral Manager 7.3 High2024-07-31
CVE-2024-37127 Dell Peripheral Manager 代码问题漏洞 — Dell Peripheral Manager 7.8 High2024-07-31
CVE-2024-37142 Dell Peripheral Manager 代码问题漏洞 — Dell Peripheral Manager 7.3 High2024-07-31
CVE-2024-41817 Arbitrary Code Execution in `AppImage` version `ImageMagick` — ImageMagick 7.0 High2024-07-29
CVE-2024-7193 Mp3tag DLL tak_deco_lib.dll uncontrolled search path — Mp3tag 5.3 Medium2024-07-29
CVE-2024-39820 Zoom Workplace Desktop App for macOS - Uncontrolled Search Path Element — Zoom Workplace Desktop App for macOS 6.6 Medium2024-07-15
CVE-2024-38330 IBM i privilege escalation — i 7.0 High2024-07-08
CVE-2024-1182 Mitsubishi Electric MC Works64 代码问题漏洞 — GENESIS64 7.0 High2024-07-04
CVE-2024-34116 Adobe Creative Cloud App Install Arbitrary Folder Delete Vulnerability can be abuse to Privilege Escalation — Creative Cloud Desktop 7.1 High2024-06-13
CVE-2024-37130 Dell OpenManage Server Administrator 代码问题漏洞 — Dell OpenManage Server Administrator 7.3 High2024-06-11
CVE-2024-5509 Luxion KeyShot BIP File Parsing Uncontrolled Search Path Element Remote Code Execution Vulnerability — KeyShot 7.8AIHighAI2024-06-06
CVE-2024-5292 D-Link Network Assistant Uncontrolled Search Path Element Local Privilege Escalation Vulnerability — Network Assistant 7.8AIHighAI2024-05-23

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