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

21 results · Clear filters · Feed

  • High 8.8
    CVE-2026-59265 Public exploit

    Apache OpenOffice, Apache OpenOffice: Opening a malicious document can lead to system takeover

    A code execution issue in the Java integration in Apache OpenOffice v4.1.16 and earlier allows a crafted untrusted document to trigger executing arbitrary (even remote) code when opened by the user. This issue is expected to be fixed in version 4.1.17, which …

  • High 7.8
    CVE-2026-69328 Public exploit

    Windows Storage Elevation of Privilege Vulnerability

    Untrusted search path in Windows Storage allows an authorized attacker to elevate privileges locally.

  • Medium 5.4
    CVE-2026-35603 Public exploit

    Claude Code: Insecure System-Wide Configuration Loading Enables Local Privilege Escalation on Windows

    Claude Code is an agentic coding tool. In versions prior to 2.1.75 on Windows, Claude Code loaded the system-wide default configuration from C:\ProgramData\ClaudeCode\managed-settings.json without validating directory ownership or access permissions. Because …

  • High 7.0
    CVE-2026-6421 Public exploit

    Mobatek MobaXterm Home Edition msimg32.dll uncontrolled search path

    A vulnerability has been found in Mobatek MobaXterm Home Edition up to 26.1. This affects an unknown part in the library msimg32.dll. The manipulation leads to uncontrolled search path. An attack has to be approached locally. The attack is considered to have …

  • High 7.3
    CVE-2026-39883 Public exploit

    OpenTelemetry-Go has an incomplete fix for CVE-2026-24051: BSD kenv command not using absolute path enables PATH hijacking

    OpenTelemetry-Go is the Go implementation of OpenTelemetry. From 1.15.0 to 1.42.0, the fix for CVE-2026-24051 changed the Darwin ioreg command to use an absolute path but left the BSD kenv command using a bare name, allowing the same PATH hijacking attack on …

  • High 7.0
    CVE-2026-21508 Public exploit

    Windows Storage Elevation of Privilege Vulnerability

    Improper authentication in Windows Storage allows an authorized attacker to elevate privileges locally.

  • High 7.4
    CVE-2025-59489 Public exploit

    Unity Runtime before 2025-10-02 on Android, Windows, macOS, and Linux allows argument injection that can result in load…

  • High 7.0
    CVE-2025-9267 Public exploit

    In Seagate Toolkit on Windows a vulnerability exists in the Toolkit Installer prior to versions 2.35.0.6 where it attem…

  • Critical 9.0
    CVE-2025-23266 Public exploit

    NVIDIA Container Toolkit for all platforms contains an Untrusted Search Path

    NVIDIA Container Toolkit for all platforms contains a vulnerability in some hooks used to initialize the container, where an attacker could execute arbitrary code with elevated permissions. A successful exploit of this vulnerability might lead to escalation o…

  • High 8.5
    CVE-2025-4971 Public exploit

    Broadcom Automic Automation Agent Unix privilege escalation

    Broadcom Automic Automation Agent Unix versions < 24.3.0 HF4 and < 21.0.13 HF1 allow low privileged users who have execution rights on the agent executable to escalate their privileges.

  • High 7.8
    CVE-2025-4802 Public exploit

    Untrusted LD_LIBRARY_PATH environment variable vulnerability in the GNU C Library version 2.27 to 2.38 allows attacker …

  • Low 3.3
    CVE-2024-55503 Public exploit

    An issue in termius before v.9.9.0 allows a local attacker to execute arbitrary code via a crafted script to the DYLD_I…

  • Low 3.3
    CVE-2024-53407 Public exploit

    In Phiewer 4.1.0, a dylib injection leads to Command Execution which allow attackers to inject dylib file potentially l…

  • High 7.8
    CVE-2023-1521 Public exploit

    Local Privilege Escalation in sccache

    On Linux the sccache client can execute arbitrary code with the privileges of a local sccache server, by preloading the code in a shared library passed to LD_PRELOAD. If the server is run as root (which is the default when installing the snap package https://…

  • High 7.3
    CVE-2024-50986 Public exploit

    An issue in Clementine v.1.3.1 allows a local attacker to execute arbitrary code via a crafted DLL file.

  • Medium 6.7
    CVE-2024-6769 Public exploit

    Medium to High Integrity Privilege Escalation in Microsoft Windows

    A DLL Hijacking caused by drive remapping combined with a poisoning of the activation cache in Microsoft Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, and Windows Server 2022 allows a malicious authenticated attacker to elevate from a medi…

  • High 8.4
    CVE-2024-6473 Public exploit

    DLL Hijacking in Yandex Browser

    Yandex Browser for Desktop before 24.7.1.380 has a DLL Hijacking Vulnerability because an untrusted search path is used.

  • High 8.8
    CVE-2024-32019 Public exploit

    ndsudo: local privilege escalation via untrusted search path

    Netdata is an open source observability tool. In affected versions the `ndsudo` tool shipped with affected versions of the Netdata Agent allows an attacker to run arbitrary programs with root permissions. The `ndsudo` tool is packaged as a `root`-owned execut…

  • Medium 6.7
    CVE-2023-36003 Public exploit

    XAML Diagnostics Elevation of Privilege Vulnerability

    XAML Diagnostics Elevation of Privilege Vulnerability

  • Critical 9.8
    CVE-2023-30330 Public exploit

    SoftExpert (SE) Excellence Suite 2.x versions before 2.1.3 is vulnerable to Local File Inclusion in the function /se/v4…

  • High 7.3
    CVE-2016-10009 Public exploit EPSS 37%

    Untrusted search path vulnerability in ssh-agent.c in ssh-agent in OpenSSH before 7.4 allows remote attackers to execut…