CWE-426
Weakness Allowed-with-ReviewUntrusted Search Path
Abstraction: Base · Status: Stable
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.
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.
Mapping guidance
This CWE entry is often confused with another closely-related entry about search paths.
CWE-426 and CWE-427 are often misused because they both mention search paths, although CWE-426 is focused on attacker control of the search path itself, while CWE-427 applies when the attacker cannot modify the search path but can write to one of the locations specified in the search path. Also, this entry is classified in a part of CWE's hierarchy that does not have sufficiently low-level coverage, which might reflect a lack of classification-oriented weakness research in the software security community. Conduct careful root cause analysis to determine the original mistake that led to this weakness. If closer analysis reveals that this weakness is appropriate, then this might be the best available CWE to use for mapping. If no other option is available, then it is acceptable to map to this CWE.
Relationships and members
Modes of introduction
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.)
Effectiveness: High
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.
Content history
updated Time_of_Introduction
updated Common_Consequences, Relationships, Taxonomy_Mappings
updated Relationships, Taxonomy_Mappings
updated Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Observed_Examples, Potential_Mitigations, Relationships, Time_of_Introduction
updated Demonstrative_Examples, Potential_Mitigations
updated References
updated References, Relationships
updated Applicable_Platforms
updated Detection_Factors, Potential_Mitigations
updated Description, Relationships
updated Demonstrative_Examples
updated Common_Consequences
updated Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, References
updated Demonstrative_Examples, Detection_Factors, Potential_Mitigations
updated Relationships
updated Demonstrative_Examples, Modes_of_Introduction, References, Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, References, Relationships, Type
updated Related_Attack_Patterns
updated Related_Attack_Patterns, Relationships
updated Relationships
updated References, Relationships
updated Demonstrative_Examples
updated Relationships
updated Research_Gaps
updated Description
updated Detection_Factors, Relationships, Time_of_Introduction
updated Mapping_Notes
updated Demonstrative_Examples
updated Mapping_Notes
updated Relationships, Weakness_Ordinalities
updated Applicable_Platforms, Common_Consequences, Description, References, Relationships, Taxonomy_Mappings
1044 vulnerabilities reference this CWE, most recent first.
GHSA-X7FR-PG8F-93F5
Vulnerability from github – Published: 2023-05-30 20:06 – Updated: 2024-11-26 18:57Impact
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), this means a user running the sccache client can get root privileges.
Patches
Upgrade to 0.4.0
Workarounds
Don't run sccache server as root.
GitHub Security Lab number
GHSL-2023-046
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "sccache"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.4.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-1521"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": true,
"github_reviewed_at": "2023-05-30T20:06:02Z",
"nvd_published_at": "2024-11-26T12:15:18Z",
"severity": "HIGH"
},
"details": "### Impact\n\nOn 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`.\n\nIf the server is run as root (which is the default when installing the [snap package](https://snapcraft.io/sccache)), this means a user running the `sccache` client can get root privileges.\n\n\n### Patches\nUpgrade to 0.4.0\n\n### Workarounds\nDon\u0027t run sccache server as root. \n\n### GitHub Security Lab number\n\nGHSL-2023-046",
"id": "GHSA-x7fr-pg8f-93f5",
"modified": "2024-11-26T18:57:08Z",
"published": "2023-05-30T20:06:02Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mozilla/sccache/security/advisories/GHSA-x7fr-pg8f-93f5"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1521"
},
{
"type": "PACKAGE",
"url": "https://github.com/mozilla/sccache"
},
{
"type": "WEB",
"url": "https://github.com/mozilla/sccache/releases/tag/v0.4.0"
},
{
"type": "ADVISORY",
"url": "https://securitylab.github.com/advisories/GHSL-2023-046_ScCache"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "sccache vulnerable to privilege escalation if server is run as root"
}
GHSA-X7H5-VP6W-G56R
Vulnerability from github – Published: 2022-05-13 01:06 – Updated: 2022-05-13 01:06Untrusted search path vulnerability in the installer in Adobe Flash Player before 10.3.183.20 and 11.x before 11.3.300.257 on Windows and Mac OS X; before 10.3.183.20 and 11.x before 11.2.202.236 on Linux; before 11.1.111.10 on Android 2.x and 3.x; and before 11.1.115.9 on Android 4.x, and Adobe AIR before 3.3.0.3610, allows local users to gain privileges via a Trojan horse executable file in an unspecified directory.
{
"affected": [],
"aliases": [
"CVE-2012-2040"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-06-09T00:55:00Z",
"severity": "HIGH"
},
"details": "Untrusted search path vulnerability in the installer in Adobe Flash Player before 10.3.183.20 and 11.x before 11.3.300.257 on Windows and Mac OS X; before 10.3.183.20 and 11.x before 11.2.202.236 on Linux; before 11.1.111.10 on Android 2.x and 3.x; and before 11.1.115.9 on Android 4.x, and Adobe AIR before 3.3.0.3610, allows local users to gain privileges via a Trojan horse executable file in an unspecified directory.",
"id": "GHSA-x7h5-vp6w-g56r",
"modified": "2022-05-13T01:06:44Z",
"published": "2022-05-13T01:06:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2040"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2012-06/msg00006.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2012-06/msg00007.html"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb12-14.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-X7P4-C67J-9FVF
Vulnerability from github – Published: 2022-05-13 01:54 – Updated: 2022-05-13 01:54Opera before 57.0.3098.106 is vulnerable to a DLL Search Order hijacking attack where an attacker can send a ZIP archive composed of an HTML page along with a malicious DLL to the target. Once the document is opened, it may allow the attacker to take full control of the system from any location within the system. The issue lies in the loading of the shcore.dll and dcomp.dll files: these files are being searched for by the program in the same system-wide directory where the HTML file is executed.
{
"affected": [],
"aliases": [
"CVE-2018-18913"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-03-21T22:29:00Z",
"severity": "HIGH"
},
"details": "Opera before 57.0.3098.106 is vulnerable to a DLL Search Order hijacking attack where an attacker can send a ZIP archive composed of an HTML page along with a malicious DLL to the target. Once the document is opened, it may allow the attacker to take full control of the system from any location within the system. The issue lies in the loading of the shcore.dll and dcomp.dll files: these files are being searched for by the program in the same system-wide directory where the HTML file is executed.",
"id": "GHSA-x7p4-c67j-9fvf",
"modified": "2022-05-13T01:54:06Z",
"published": "2022-05-13T01:54:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-18913"
},
{
"type": "WEB",
"url": "https://blogs.opera.com/desktop/changelog-for-57"
},
{
"type": "WEB",
"url": "https://lucideustech.blogspot.com/2019/02/opera-search-order-hijacking-cve-2018-18913.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X7R3-WFM5-6XM2
Vulnerability from github – Published: 2026-07-28 21:31 – Updated: 2026-07-28 21:31Bridge is affected by an Untrusted Search Path vulnerability that could result in arbitrary code execution in the context of the current user. An attacker could exploit this vulnerability to execute arbitrary code. Exploitation of this issue requires user interaction in that a victim must open a malicious file. Scope is changed.
{
"affected": [],
"aliases": [
"CVE-2026-48395"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-28T19:17:35Z",
"severity": "HIGH"
},
"details": "Bridge is affected by an Untrusted Search Path vulnerability that could result in arbitrary code execution in the context of the current user. An attacker could exploit this vulnerability to execute arbitrary code. Exploitation of this issue requires user interaction in that a victim must open a malicious file. Scope is changed.",
"id": "GHSA-x7r3-wfm5-6xm2",
"modified": "2026-07-28T21:31:32Z",
"published": "2026-07-28T21:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48395"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/bridge/apsb26-89.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X8J8-538P-X6XV
Vulnerability from github – Published: 2025-01-14 18:31 – Updated: 2025-01-14 18:31A vulnerability, which was classified as problematic, has been found in libretro RetroArch up to 1.19.1 on Windows. Affected by this issue is some unknown functionality in the library profapi.dll of the component Startup. The manipulation leads to untrusted search path. An attack has to be approached locally. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2025-0459"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-14T16:15:34Z",
"severity": "MODERATE"
},
"details": "A vulnerability, which was classified as problematic, has been found in libretro RetroArch up to 1.19.1 on Windows. Affected by this issue is some unknown functionality in the library profapi.dll of the component Startup. The manipulation leads to untrusted search path. An attack has to be approached locally. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-x8j8-538p-x6xv",
"modified": "2025-01-14T18:31:58Z",
"published": "2025-01-14T18:31:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-0459"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.291476"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.291476"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.474011"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-X8RM-C2PF-M49V
Vulnerability from github – Published: 2022-05-17 02:43 – Updated: 2022-05-17 02:43Untrusted search path vulnerability in installers for The Public Certification Service for Individuals "The JPKI user's software (for Windows 7 and later)" Ver3.1 and earlier, The Public Certification Service for Individuals "The JPKI user's software (for Windows Vista)", The Public Certification Service for Individuals "The JPKI user's software" Ver2.6 and earlier that were available until April 27, 2017 allows remote attackers to gain privileges via a Trojan horse DLL in an unspecified directory.
{
"affected": [],
"aliases": [
"CVE-2017-2157"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-05-12T18:29:00Z",
"severity": "HIGH"
},
"details": "Untrusted search path vulnerability in installers for The Public Certification Service for Individuals \"The JPKI user\u0027s software (for Windows 7 and later)\" Ver3.1 and earlier, The Public Certification Service for Individuals \"The JPKI user\u0027s software (for Windows Vista)\", The Public Certification Service for Individuals \"The JPKI user\u0027s software\" Ver2.6 and earlier that were available until April 27, 2017 allows remote attackers to gain privileges via a Trojan horse DLL in an unspecified directory.",
"id": "GHSA-x8rm-c2pf-m49v",
"modified": "2022-05-17T02:43:41Z",
"published": "2022-05-17T02:43:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-2157"
},
{
"type": "WEB",
"url": "https://www.jpki.go.jp/download/win.html#dl"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN39605485/index.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X952-Q3GW-7JP6
Vulnerability from github – Published: 2023-06-27 00:30 – Updated: 2024-04-04 05:11An untrusted search path vulnerability in the Trend Micro Apex One and Apex One as a Service security agent could allow a local attacker to escalate their privileges on affected installations.
Please note: an attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
This is a similar, but not identical vulnerability as CVE-2023-34144.
{
"affected": [],
"aliases": [
"CVE-2023-34145"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-26T22:15:11Z",
"severity": "HIGH"
},
"details": "An untrusted search path vulnerability in the Trend Micro Apex One and Apex One as a Service security agent could allow a local attacker to escalate their privileges on affected installations.\n\nPlease note: an attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThis is a similar, but not identical vulnerability as CVE-2023-34144.",
"id": "GHSA-x952-q3gw-7jp6",
"modified": "2024-04-04T05:11:35Z",
"published": "2023-06-27T00:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34145"
},
{
"type": "WEB",
"url": "https://success.trendmicro.com/dcx/s/solution/000293322?language=en_US"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-23-836"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X973-HJ72-FC88
Vulnerability from github – Published: 2026-10-13 00:31 – Updated: 2026-10-13 00:31IBM Aspera Enterprise WebApps 1.0.0 through 1.0.6 could allow a local attacker to gain elevated privileges due to a misconfigured PATH environment variable.
{
"affected": [],
"aliases": [
"CVE-2026-75782"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-12T23:17:39Z",
"severity": "HIGH"
},
"details": "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 environment variable.",
"id": "GHSA-x973-hj72-fc88",
"modified": "2026-10-13T00:31:40Z",
"published": "2026-10-13T00:31:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-75782"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7291755"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X9HC-8R9X-C29V
Vulnerability from github – Published: 2026-06-09 18:31 – Updated: 2026-06-09 18:31Untrusted search path in Windows Narrator Braille allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-48565"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-09T17:17:45Z",
"severity": "HIGH"
},
"details": "Untrusted search path in Windows Narrator Braille allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-x9hc-8r9x-c29v",
"modified": "2026-06-09T18:31:00Z",
"published": "2026-06-09T18:31:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48565"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-48565"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X9QQ-H45J-7CHV
Vulnerability from github – Published: 2022-05-24 19:11 – Updated: 2022-05-24 19:11A DLL preloading vulnerability was reported in Lenovo Driver Management prior to version 2.9.0719.1104 that could allow privilege escalation.
{
"affected": [],
"aliases": [
"CVE-2021-3633"
],
"database_specific": {
"cwe_ids": [
"CWE-426",
"CWE-427"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-08-17T17:15:00Z",
"severity": "HIGH"
},
"details": "A DLL preloading vulnerability was reported in Lenovo Driver Management prior to version 2.9.0719.1104 that could allow privilege escalation.",
"id": "GHSA-x9qq-h45j-7chv",
"modified": "2022-05-24T19:11:26Z",
"published": "2022-05-24T19:11:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3633"
},
{
"type": "WEB",
"url": "https://iknow.lenovo.com.cn/detail/dc_198418.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Strategy: Attack Surface Reduction
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.
Mitigation
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.
Mitigation
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.
Mitigation
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.
Mitigation
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.
CAPEC-38: Leveraging/Manipulating Configuration File Search Paths
This pattern of attack sees an adversary load a malicious resource into a program's standard path so that when a known command is executed then the system instead executes the malicious component. The adversary can either modify the search path a program uses, like a PATH variable or classpath, or they can manipulate resources on the path to point to their malicious components. J2EE applications and other component based applications that are built from multiple binaries can have very long list of dependencies to execute. If one of these libraries and/or references is controllable by the attacker then application controls can be circumvented by the attacker.