Skip to content
OpenAdvisories

Weakness (CWE)

CWE-426: Untrusted Search Path

Base

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.

More detail

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.

How to prevent it (5 mitigations)
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Source: MITRE CWE-426

374 results · Feed

  • High 7.3

    Poetry's Untrusted Search Path can lead to Local Code Execution on Windows

    Poetry is a dependency manager for Python. To handle dependencies that come from a Git repository, Poetry executes various commands, e.g. `git config`. These commands are being executed using the executable’s name and not its absolute path. This can lead to t…

  • High 7.8
    CVE-2022-22047 Exploited EPSS 18%

    Windows Client Server Run-time Subsystem (CSRSS) Elevation of Privilege Vulnerability

    Windows Client Server Run-time Subsystem (CSRSS) Elevation of Privilege Vulnerability

    KEV Jul 12, 2022
  • High 8.2

    Git for Windows' installer can be tricked into executing an untrusted binary

    Git for Windows is a fork of Git that contains Windows-specific patches. This vulnerability in versions prior to 2.37.1 lets Git for Windows' installer execute a binary into `C:\mingw64\bin\git.exe` by mistake. This only happens upon a fresh install, not when…

  • High 8.8

    Viscosity DLL untrusted search path

    A vulnerability was found in Viscosity 1.6.7. It has been classified as critical. This affects an unknown part of the component DLL Handler. The manipulation leads to untrusted search path. It is possible to initiate the attack remotely. The exploit has been …

  • High 7.5

    sinatra does not validate expanded path matches

    Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.

  • Critical 9.8

    Git LFS can execute a binary from the current directory on Windows

    On Windows, if Git LFS operates on a malicious repository with a `..exe` file as well as a file named `git.exe`, and `git.exe` is not found in `PATH`, the `..exe` program will be executed, permitting the attacker to execute arbitrary code. This does not affec…

  • Critical 9.8

    Poetry before v1.1.9 contains Untrusted Search Path

    Poetry v1.1.9 and below was discovered to contain an untrusted search path which causes the application to behave in unexpected ways when users execute Poetry commands in a directory containing malicious content. This vulnerability occurs when the application…

  • High 8.8

    Untrusted Search Path in PNPM

    PNPM v6.15.1 and below was discovered to contain an untrusted search path which causes the application to behave in unexpected ways when users execute PNPM commands in a directory containing malicious content. This vulnerability occurs when the application is…

  • Medium 6.7

    Cortex XDR Agent: Unintended Program Execution When Using Live Terminal Session

    An untrusted search path vulnerability exists in the Palo Alto Networks Cortex XDR agent that enables a local attacker with file creation privilege in the Windows root directory (such as C:\) to store a program that can then be unintentionally executed by ano…

  • Unscored —

    A untrusted search path issue was found in Calibre at devices/linux_mount_helper.c leading to the ability of unprivileg…

  • High 7.8

    SupportAssist Client version 3.8 and 3.9 contains an Untrusted search path vulnerability that allows attackers to load …

  • High 8.2

    DLL side loading vulnerability in MA for Windows

    A DLL sideloading vulnerability in McAfee Agent for Windows prior to 5.7.4 could allow a local user to perform a DLL sideloading attack with an unsigned DLL with a specific name and in a specific location. This would result in the user gaining elevated permis…

  • High 7.3

    Untrusted Search Path in Nextcloud Desktop Client

    The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud Server with a computer. The Nextcloud Desktop Client invokes its uninstaller script when being installed to make sure there are no remnants of previous installations. In versions 3.0.3…

  • Medium 4.4

    Dell EMC PowerScale OneFS contains an untrusted search path vulnerability. This vulnerability allows a user with (ISI_P…

  • Unscored —

    The OpenSSL component of the Teradici PCoIP Standard Agent prior to version 21.07.0 was compiled without the no-autoloa…

  • Unscored —

    The OpenSSL component of the Teradici PCoIP Software Client prior to version 21.07.0 was compiled without the no-autolo…

  • High 7.8

    CA eHealth Performance Manager through 6.3.2.12 is affected by Privilege Escalation via a Dynamically Linked Shared Obj…

  • Medium 6.5

    Adobe Creative Cloud Unquoted Service Path in CCXProcess

    Adobe Creative Cloud Desktop Application version 5.3 (and earlier) is affected by an Unquoted Service Path vulnerability in CCXProcess that could allow an attacker to achieve arbitrary code execution in the process of the current user. Exploitation of this is…

  • Medium 6.2

    Adobe Dreamweaver Untrusted Search Path Vulnerability Could Lead To Information Disclosure

    Adobe Dreamweaver versions 21.0 (and earlier) and 20.2 (and earlier) is affected by an untrusted search path vulnerability that could result in information disclosure. An attacker with physical access to the system could replace certain configuration files an…

  • High 7.2

    Git LFS can execute a Git binary from the current directory on Windows

    Git LFS is a command line extension for managing large files with Git. On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitr…

  • Unscored —

    SonicWall Global VPN client version 4.10.4.0314 and earlier allows unprivileged windows user to elevate privileges to S…

  • Unscored —

    Check Point ZoneAlarm before version 15.8.139.18543 allows a local actor to escalate privileges while restoring files i…

  • High 7.8

    A DLL search path vulnerability was reported in Lenovo Diagnostics prior to version 4.35.4 that could allow a user with…

  • High 7.8

    DLL Hijacking

    A DLL Hijacking vulnerability in Eaton's 9000x Programming and Configuration Software v 2.0.38 and prior allows an attacker to execute arbitrary code by replacing the required DLLs with malicious DLLs when the software try to load vci11un6.DLL and cinpl.DLL.

  • Unscored —

    The Windows installer for PostgreSQL 9.5 - 12 invokes system-provided executables that do not have fully-qualified path…

  • Medium 6.0

    DLL Injection vulnerability in MA for Windows

    DLL Injection Vulnerability in McAfee Agent (MA) for Windows prior to 5.6.6 allows local users to execute arbitrary code via careful placement of a malicious DLL.

  • High 7.3

    A DLL search path vulnerability was reported in Lenovo Drivers Management prior to version 2.7.1128.1046 that could all…

  • High 7.8

    Adobe ColdFusion 2016 update 15 and earlier versions, and ColdFusion 2018 update 9 and earlier versions have a dll sear…

  • High 7.8

    Adobe ColdFusion 2016 update 15 and earlier versions, and ColdFusion 2018 update 9 and earlier versions have a dll sear…

  • Medium 4.6

    DLL search order hijacking in Host IPS

    DLL Search Order Hijacking Vulnerability in the installer component of McAfee Host Intrusion Prevention System (Host IPS) for Windows prior to 8.0.0 Patch 15 Update allows attackers with local access to execute arbitrary code via execution from a compromised …

  • Medium 6.7

    A symbolic link vulnerability in some Lenovo installation packages, prior to version 1.2.9.3, could allow privileged fi…

  • Medium 6.7

    A DLL search path vulnerability could allow privilege escalation in some Lenovo installation packages, prior to version…

  • Unscored —

    A CWE-426: Untrusted Search Path vulnerability exists in Vijeo Designer Basic (V1.1 HotFix 15 and prior) and Vijeo Desi…

  • Medium 6.3

    Untrusted Search Path Vulnerability in High-Level Antimalware SDK

    Untrusted Search Path vulnerability in Bitdefender High-Level Antimalware SDK for Windows allows an attacker to load third party code from a DLL library in the search path. This issue affects: Bitdefender High-Level Antimalware SDK for Windows versions prior …

  • Unscored —

    A CWE-426: Untrusted Search Path vulnerability exists in ZigBee Installation Kit (Versions prior to 1.0.1), which could…

  • High 7.5

    A untrusted search path vulnerability in Fortinet may allow attacker to execute unauthorized code or commands via netwo…

  • High 7.1

    A untrusted search path vulnerability in Fortinet may allow attacker to execute unauthorized code or commands via netwo…

  • Medium 5.3

    Untrusted Search Path vulnerability in EPSecurityService.exe (VA-3500)

    An Untrusted Search Path vulnerability in EPSecurityService.exe as used in Bitdefender Endpoint Security Tools versions prior to 6.6.11.163 allows an attacker to load an arbitrary DLL file from the search path. This issue affects: Bitdefender EPSecurityServic…

  • Medium 5.2

    Untrusted Search Path vulnerability in Bitdefender Total Security 2020 (VA-5895)

    An Untrusted Search Path vulnerability in bdserviceshost.exe as used in Bitdefender Total Security 2020 allows an attacker to execute arbitrary code. This issue does not affect: Bitdefender Total Security versions prior to 24.0.12.69.

  • Unscored —

    A CWE-426: Untrusted Search Path vulnerability exists in SoMachine HVAC v2.4.1 and earlier versions, which could cause …