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-2020-6787 Uncontrolled Search Path Element in Bosch Video Client installer — Video Client 7.8 High 2021-03-25
CVE-2020-6786 Uncontrolled Search Path Element in Bosch Video Recording Manager Installer — Video Recording Manager 7.8 High 2021-03-25
CVE-2020-6785 Uncontrolled Search Path Element in Bosch BVMS and BVMS Viewer — BVMS 7.8 High 2021-03-25
CVE-2020-6771 Uncontrolled Search Path Element in Bosch IP Helper — IP Helper 7.8 High 2021-03-25
CVE-2021-22665 Rockwell Automation DriveTools SP 和 Drives AOP 代码问题漏洞 — Rockwell Automation DriveTools SP and Drives AOP 7.8 - 2021-03-18
CVE-2021-21518 DELL Dell SupportAssist Client 代码问题漏洞 — Dell SupportAssist Client 7.8 High 2021-03-12
CVE-2021-1280 Cisco Advanced Malware Protection for Endpoints and Immunet for Windows DLL Hijacking Vulnerability — Cisco AMP for Endpoints 7.8 High 2021-01-20
CVE-2021-21007 Uncontrolled search path element vulnerability in Illustrator 25.0 could lead to arbitrary code execution — Illustrator 7.0 High 2021-01-13
CVE-2021-21008 Uncontrolled Search Path Element vulnerability in Animate 21.0 — Animate 7.0 High 2021-01-13
CVE-2021-21010 Uncontrolled search path element in Adobe InCopy — InCopy 7.0 High 2021-01-13
CVE-2021-21011 Uncontrolled Search Path Element in Adobe Captivate 2019 — Captivate 7.0 High 2021-01-13
CVE-2021-1240 Cisco Proximity Desktop for Windows DLL Hijacking Vulnerability — Cisco Proximity 4.8 Medium 2021-01-13
CVE-2021-1237 Cisco AnyConnect Secure Mobility Client for Windows DLL Injection Vulnerability — Cisco AnyConnect Secure Mobility Client 7.8 High 2021-01-13
CVE-2020-24440 Uncontrolled Search Path Element in Adobe Prelude for Windows — Prelude 7.0 High 2020-12-11
CVE-2020-24447 Uncontrolled Search Path Element vulnerability in Lightroom Classic 10.0 — Lightroom 7.0 High 2020-12-11
CVE-2020-2049 Cortex XDR Agent: Improper control of loaded DLL leads to local privilege escalation — Cortex XDR Agent 7.8 High 2020-12-09
CVE-2020-27348 snapcraft may build snaps with incorrect LD_LIBRARY_PATH — snapcraft 6.8 Medium 2020-12-04
CVE-2020-6021 Check Point Endpoint Security Client 代码问题漏洞 — Check Point Endpoint Security Client for Windows 7.8 - 2020-12-03
CVE-2020-25174 B. Braun OnlineSuite — OnlineSuite 7.8 - 2020-11-06
CVE-2020-5145 SonicWall Global VPN client 代码问题漏洞 — SonicWall Global VPN Client 7.8 - 2020-10-28
CVE-2020-24423 Uncontrolled Search Path in Adobe Media Encoder for Windows — Media Encoder 7.0 High 2020-10-21
CVE-2020-24424 Uncontrolled Search Path in Adobe Premiere Pro for Windows — Premiere 7.0 High 2020-10-21
CVE-2020-24420 Uncontrolled Search Path Element in Adobe Photoshop for Windows — Photoshop 7.0 High 2020-10-21
CVE-2020-24419 Uncontrolled Search Path Element in Adobe After Effects for Windows — After Effects 7.0 High 2020-10-21
CVE-2020-24425 Privilege escalation vulnerability in Dreamweaver version 20.2 — Dreamweaver 7.5 High 2020-10-21
CVE-2020-24422 Uncontrolled Search Path in Creative Cloud Desktop Application — Creative Cloud (desktop component) 7.0 High 2020-10-21
CVE-2020-8345 Lenovo Vantage 代码问题漏洞 — Vantage HardwareScan Plugin 7.3 High 2020-10-14
CVE-2020-3535 Cisco Webex Teams Client for Windows DLL Hijacking Vulnerability — Cisco Webex Teams 7.8 High 2020-10-08
CVE-2020-6654 DLL Hijacking — 9000x Programming and Configuration Software 7.8 High 2020-09-30
CVE-2020-7358 Code Injection in Rapid7 AppSpider Pro Installer — AppSpider 5.8 Medium 2020-09-18

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