CWEweakness
CWE-426 Untrusted Search Path
High
Official page ↗
- Alternate terms
- Untrusted Path
- Abstraction
- Base
- Structure
- Simple
- Status
- Stable
- Likelihood of exploit
- High
- Languages
- Not Language-Specific, Python
- CWE version
- 5.0
Description
The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.
Extended description
Some of the most common variants of untrusted search path are:
• In various UNIX and Linux-based systems, the PATH environment variable may be consulted to locate executable programs, and LD_PRELOAD may be used to locate a separate library. Programming languages may have their own paths for locating code, e.g. PERL5LIB in Perl.
• In various Microsoft-based systems, the PATH environment variable is consulted to locate a DLL, if the DLL is not found in other paths that appear earlier in the search order.
Common consequences
• Integrity, Confidentiality, Availability, Access Control: Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands — There is the potential for arbitrary code execution with privileges of the vulnerable program. If the product uses a search path to locate critical resources such as programs or libraries, then an attacker could modify that search path to point to a malicious program/library, which the targeted product would then execute.
• Availability: DoS: Crash, Exit, or Restart — The program could be redirected to the wrong files, potentially triggering a crash or hang when the targeted file is too large or does not have the expected format.
• Confidentiality: Read Files or Directories — The program could access unauthorized data and send the output of unauthorized files to the attacker.
• Other: Varies by Context — The problem extends to any type of critical resource that the product trusts. For example, the attacker could modify configuration in unexpected ways.
Potential mitigations
• [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 refer to these paths.
• [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.
• [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 it, while execl() and execv() require a full path.
Detection methods
• Black Box: Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic.
Attach the monitor to the process and look for library functions and system calls that suggest when a search path is being used. One pattern is when the program performs multiple accesses of the same file but in different directories, with repeated failures until the proper filename is found. Library calls such as getenv() or their equivalent can be checked to see if any path-related variables are being accessed.
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
• Manual Analysis: Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.
Observed examples
• CVE-1999-1120: Application relies on its PATH environment variable to find and execute program.
• CVE-2008-1810: Database application relies on its PATH environment variable to find and execute program.
• CVE-2007-2027: Chain: untrusted search path enabling resultant format string by loading malicious internationalization messages.
• CVE-2008-3485: Untrusted search path using malicious .EXE in Windows environment.
• CVE-2008-2613: setuid program allows compromise using path that finds and loads a malicious library.
• CVE-2008-1319: Server allows client to specify the search path, which can be modified to point to a program that the client has uploaded.
Related
Attack pattern · CAPEC (1)
- CAPEC-38 Leveraging/Manipulating Configuration File Search Paths attack pattern
Observed example · CVE (6)
- CVE-2008-3485 Untrusted search path vulnerability in Citrix MetaFrame Presentation Server allows local users to gain privileges via a malicious… vulnerability
- CVE-2008-1810 Untrusted search path vulnerability in dbmsrv in SAP MaxDB 7.6.03.15 on Linux allows local users to gain privileges via a modified PATH… vulnerability
- CVE-2008-2613 Unspecified vulnerability in the Database Scheduler component in Oracle Database 10.2.0.4 and 11.1.0.6 has unknown impact and local attack… vulnerability
- CVE-2008-1319 Untrusted search path and argument injection vulnerability in the VersantD service in Versant Object Database 7.0.1.3 and earlier, as used… vulnerability
- CVE-2007-2027 Untrusted search path vulnerability in the add_filename_to_string function in intl/gettext/loadmsgcat.c for Elinks 0.11.1 allows local… vulnerability
- CVE-1999-1120 netprint in SGI IRIX 6.4 and earlier trusts the PATH environmental variable for finding and executing the disable program, which allows… vulnerability
Child of · CWE (3)
Peer of · CWE (2)
Referenced by CAPEC · weakness (1)
- CAPEC-38 Leveraging/Manipulating Configuration File Search Paths attack pattern
Referenced by CVE · weakness (710)
- CVE-2026-105477 A vulnerability in Veeam Agent for Linux allows for local privilege escalation. vulnerability
- CVE-2026-57203 Asterisk is an open source private branch exchange and telephony toolkit. vulnerability
- CVE-2026-113461 Local privilege escalation in Checkmk 2.5.0p14 allows a local user with write access to the Oracle client library directory of an Oracle… vulnerability
- CVE-2026-95182 An untrusted search path in DeepSeek Harness (dsh) commit c291e796 allows attackers to execute arbitrary code via supplying and opening… vulnerability
- CVE-2026-0315 A local privilege escalation vulnerability in the Palo Alto Networks GlobalProtect™ app enables a local user to escalate their privileges… vulnerability
- CVE-2026-103847 Dimension is affected by an Untrusted Search Path vulnerability that could result in arbitrary code execution in the context of the current… vulnerability
- CVE-2026-108398 Untrusted search path in .NET Framework allows an authorized attacker to bypass a security feature locally. vulnerability
- CVE-2026-4869 A potential privilege escalation issue was identified in InstallShield version 2025 R2 and earlier when running compressed Basic MSI setup… vulnerability
- CVE-2026-69733 Untrusted search path in Windows Update allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-69882 Untrusted search path in Windows Update allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-70142 Untrusted search path in Windows Update Service allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-83505 Time-of-check time-of-use (toctou) race condition in Windows Setup Files Cleanup allows an authorized attacker to elevate privileges… vulnerability
- CVE-2026-83506 Untrusted search path in Servicing Stack Updates allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-83509 Untrusted search path in Windows Setup Files Cleanup allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-75782 IBM Aspera Enterprise WebApps 1.0.0 through 1.0.6 could allow a local attacker to gain elevated privileges due to a misconfigured PATH… vulnerability
- CVE-2026-105331 Local privilege escalation in Checkmk 2.5.0 before 2.5.0p10 allows a user with access to edit the Oracle Instant Client referenced by the… vulnerability
- CVE-2026-106505 Backstage is an open framework for building developer portals. vulnerability
- CVE-2026-104809 DigitalCanion has discovered a vulnerability that allows an attacker to cause the system to load an attacker-controlled .so file instead of… vulnerability
- CVE-2026-59265 A code execution issue in the Java integration in Apache OpenOffice v4.1.16 and earlier allows a crafted untrusted document to trigger… vulnerability
- CVE-2026-19547 Ghostscript for Windows is vulnerable to local privilege escalation through PostScript resource file hijacking. vulnerability
- CVE-2026-87723 In Google fuse-archive versions prior to 1.24, an attacker who can prepend a directory to PATH or write a malicious binary to an… vulnerability
- CVE-2026-100584 OpenClaw is an npm-distributed agent runtime. vulnerability
- CVE-2026-100310 GNU libextractor before 1.16 loads plugins from an untrusted search path specified by the LIBEXTRACTOR_PREFIX environment variable without… vulnerability
- CVE-2026-68492 An untrusted search path vulnerability in Plesk from 18.0.34 before 18.0.80.8 and 18.0.81 before 18.0.81.1 allows remote authenticated… vulnerability
- CVE-2026-92587 n8n is a workflow automation platform. vulnerability
- CVE-2026-0307 Multiple local privilege escalation vulnerabilities in the Palo Alto Networks GlobalProtect™ app allows a local user to escalate their… vulnerability
- CVE-2026-69328 Untrusted search path in Windows Storage allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-69785 Untrusted search path in Windows Smart Card allows an authorized attacker to elevate privileges locally. vulnerability
- CVE-2026-78574 The Okta Hyperdrive Integration plugin resolves a required assembly using a registry path within the current user's hive without integrity… vulnerability
- CVE-2026-80159 Acrobat Reader is affected by an Untrusted Search Path vulnerability that could result in privilege escalation. vulnerability
Referenced by CWE · can also be (1)
- CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program weakness
Referenced by CWE · has member (1)
- CWE-1200 Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors view