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

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

621 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, Availability Execute Unauthorized Code or Commands
Mitigations (5)
Architecture and Design, Implementation Hard-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.
Implementation When 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…
Implementation Remove 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.
Implementation Check 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.
Implementation Use 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 ID Title CVSS Severity Published
CVE-2024-53977 Siemens ModelSim和Siemens Questa 代码问题漏洞 — ModelSim 6.7 Medium 2025-02-11
CVE-2024-2658 Local privilege escalation in FlexNet Publisher — FlexNet Publisher 7.8 - 2025-01-30
CVE-2024-9499 Uncontrolled search path can lead to DLL hijacking in USBXpress Win 98SE Dev Kit installer — USBXpress Win 98SE Dev Kit 8.6 High 2025-01-24
CVE-2024-9498 Uncontrolled search path can lead to DLL hijacking in USBXpress SDK installer — USBXpress SDK 8.6 High 2025-01-24
CVE-2024-9497 Uncontrolled search path can lead to DLL hijacking in USBXpress 4 SDK installer — USBXpress 4 SDK 8.6 High 2025-01-24
CVE-2024-9496 Uncontrolled search path can lead to DLL hijacking in USBXpress Dev Kit installer — USBXpress Dev Kit 8.6 High 2025-01-24
CVE-2024-9495 Uncontrolled search path can lead to DLL hijacking in CP210x VCP Windows installer — CP210x VCP Windows 8.6 High 2025-01-24
CVE-2024-9494 Uncontrolled search path can lead to DLL hijacking in CP210 VCP Win 2k installer — CP210 VCP Win 2k 8.6 High 2025-01-24
CVE-2024-9493 Uncontrolled search path can lead to DLL hijacking in ToolStick installer — ToolStick 8.6 High 2025-01-24
CVE-2024-9492 Uncontrolled search path can lead to DLL hijacking in Flash Programming Utility installer — Flash Programming Utility 8.6 High 2025-01-24
CVE-2024-9491 Uncontrolled search path can lead to DLL hijacking in Configuration Wizard 2 installer — Configuration Wizard 2 8.6 High 2025-01-24
CVE-2024-9490 Uncontrolled search path can lead to DLL hijacking in Silicon Labs IDE installer — Silicon Labs IDE (8-bit) 8.6 High 2025-01-24
CVE-2024-41739 IBM Cognos Dashboards on Cloud Pak for Data privilege escalation — Cognos Dashboards on Cloud Pak for Data 8.8 High 2025-01-24
CVE-2025-21127 Photoshop Desktop | Uncontrolled Search Path Element (CWE-427) — Photoshop Desktop 7.8 High 2025-01-14
CVE-2025-0069 DLL Hijacking vulnerability in SAPSetup — SAPSetup 7.8 High 2025-01-14
CVE-2024-55540 Acronis Cyber Protect 代码问题漏洞 — Acronis Cyber Protect 16 7.8 - 2025-01-02
CVE-2024-55543 Acronis Cyber Protect 代码问题漏洞 — Acronis Cyber Protect 16 7.8 - 2025-01-02
CVE-2024-55955 Trend Micro Deep Security 安全漏洞 — Trend Micro Deep Security 6.7 Medium 2024-12-31
CVE-2022-27595 QVPN Device Client — QVPN Windows 7.8 High 2024-12-19
CVE-2024-47576 DLL Hijacking vulnerability in SAP Product Lifecycle Costing — SAP Product Lifecycle Costing 3.3 Low 2024-12-10
CVE-2024-9852 Malicious Code Execution Vulnerability in GENESIS64, ICONICS Suite, Hyper Historian, MC Works64, and GENESIS32 — GENESIS64 7.8 High 2024-11-28
CVE-2024-8299 Malicious Code Execution Vulnerability in GENESIS64, ICONICS Suite, Hyper Historian, MC Works64, and GENESIS32 — GENESIS64 7.8 High 2024-11-28
CVE-2024-7253 NoMachine Uncontrolled Search Path Element Local Privilege Escalation Vulnerability — NoMachine 7.8 - 2024-11-22
CVE-2024-7244 Panda Security Dome VPN DLL Hijacking Local Privilege Escalation Vulnerability — Dome 7.8 - 2024-11-22
CVE-2024-30376 Famatech Advanced IP Scanner Uncontrolled Search Path Element Local Privilege Escalation Vulnerability — Advanced IP Scanner 7.8 - 2024-11-22
CVE-2024-2208 Sound Research SECOMN64 Escalation of Privilege — SECOMN64 Driver 8.8 High 2024-11-12
CVE-2024-2207 Sound Research SECOMN64 Escalation of Privilege — SECOMN64 Driver 6.0 Medium 2024-11-12
CVE-2024-47942 Siemens Solid Edge 代码问题漏洞 — Solid Edge SE2024 7.3 High 2024-11-12
CVE-2024-10389 Path Traversal in Safearchive — Safearchive 8.1AI High AI 2024-11-04
CVE-2024-50583 NAVER Whale browser Installer 安全漏洞 — Naver Whale browser Installer 7.8 - 2024-10-25

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