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-XF29-WJR7-4X79
Vulnerability from github – Published: 2024-03-12 18:31 – Updated: 2024-03-12 18:31Windows OLE Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-21435"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-12T17:15:52Z",
"severity": "HIGH"
},
"details": "Windows OLE Remote Code Execution Vulnerability",
"id": "GHSA-xf29-wjr7-4x79",
"modified": "2024-03-12T18:31:13Z",
"published": "2024-03-12T18:31:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-21435"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-21435"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XH56-FJ78-HC8J
Vulnerability from github – Published: 2022-05-17 02:40 – Updated: 2022-05-17 02:40Untrusted search path vulnerability in TKY2JGD (TKY2JGD1379.EXE) ver. 1.3.79 allows an attacker to gain privileges via a Trojan horse DLL in an unspecified directory.
{
"affected": [],
"aliases": [
"CVE-2017-2212"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-06-09T16:29:00Z",
"severity": "HIGH"
},
"details": "Untrusted search path vulnerability in TKY2JGD (TKY2JGD1379.EXE) ver. 1.3.79 allows an attacker to gain privileges via a Trojan horse DLL in an unspecified directory.",
"id": "GHSA-xh56-fj78-hc8j",
"modified": "2022-05-17T02:40:12Z",
"published": "2022-05-17T02:40:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-2212"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN52691241/index.html"
},
{
"type": "WEB",
"url": "http://www.gsi.go.jp/sokuchikijun/sokuchikijun41011.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XHJG-5G5X-RCCW
Vulnerability from github – Published: 2023-07-11 18:31 – Updated: 2024-04-04 06:00Untrusted search path in the installer for Zoom Rooms before version 5.15.0 may allow an authenticated user to enable an escalation of privilege via local access.
{
"affected": [],
"aliases": [
"CVE-2023-36536"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-11T18:15:20Z",
"severity": "HIGH"
},
"details": " Untrusted search path in the installer for Zoom Rooms before version 5.15.0 may allow an authenticated user to enable an escalation of privilege via local access.\n",
"id": "GHSA-xhjg-5g5x-rccw",
"modified": "2024-04-04T06:00:00Z",
"published": "2023-07-11T18:31:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36536"
},
{
"type": "WEB",
"url": "https://explore.zoom.us/en/trust/security/security-bulletin"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XJQ3-33J2-XCWM
Vulnerability from github – Published: 2025-01-30 21:31 – Updated: 2025-01-30 21:31Untrusted search path in the installer for some Zoom Workplace Apps for Windows may allow an authorized user to conduct an escalation of privilege via local access.
{
"affected": [],
"aliases": [
"CVE-2025-0145"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-30T20:15:34Z",
"severity": "MODERATE"
},
"details": "Untrusted search path in the installer for some Zoom Workplace Apps for Windows may allow an authorized user to conduct an escalation of privilege via local access.",
"id": "GHSA-xjq3-33j2-xcwm",
"modified": "2025-01-30T21:31:23Z",
"published": "2025-01-30T21:31:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-0145"
},
{
"type": "WEB",
"url": "https://www.zoom.com/en/trust/security-bulletin/zsb-25004"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-XM83-77F2-89MQ
Vulnerability from github – Published: 2023-12-22 18:30 – Updated: 2023-12-22 18:30Dell SupportAssist for Home PCs version 3.14.1 and prior versions contain a privilege escalation vulnerability in the installer. A local low privileged authenticated attacker may potentially exploit this vulnerability, leading to the execution of arbitrary executable on the operating system with elevated privileges.
{
"affected": [],
"aliases": [
"CVE-2023-48670"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-22T16:15:08Z",
"severity": "HIGH"
},
"details": "\nDell SupportAssist for Home PCs version 3.14.1 and prior versions contain a privilege escalation vulnerability in the installer. A local low privileged authenticated attacker may potentially exploit this vulnerability, leading to the execution of arbitrary executable on the operating system with elevated privileges.\n\n",
"id": "GHSA-xm83-77f2-89mq",
"modified": "2023-12-22T18:30:31Z",
"published": "2023-12-22T18:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-48670"
},
{
"type": "WEB",
"url": "https://www.dell.com/support/kbdoc/en-us/000220677/dsa-2023-468-security-update-for-dell-supportassist-for-home-pcs-installer-file-local-privilege-escalation-vulnerability"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XM99-6PV5-Q363
Vulnerability from github – Published: 2022-04-23 00:03 – Updated: 2023-05-24 17:39service_windows.go in the kardianos service package for Go omits quoting that is sometimes needed for execution of a Windows service executable from the intended directory.
The validity of this vulnerability has been questioned and the reporter has requested that the CVE be disputed.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/kardianos/service"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.2.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-29583"
],
"database_specific": {
"cwe_ids": [
"CWE-426",
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2022-04-26T13:15:34Z",
"nvd_published_at": "2022-04-22T16:15:00Z",
"severity": "HIGH"
},
"details": "service_windows.go in the kardianos service package for Go omits quoting that is sometimes needed for execution of a Windows service executable from the intended directory.\n\nThe validity of this vulnerability has been [questioned](https://github.com/kardianos/service/pull/290#issuecomment-1109831505) and the reporter has requested that the CVE be [disputed](https://github.com/kardianos/service/issues/289#issuecomment-1110546798).",
"id": "GHSA-xm99-6pv5-q363",
"modified": "2023-05-24T17:39:54Z",
"published": "2022-04-23T00:03:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29583"
},
{
"type": "WEB",
"url": "https://github.com/kardianos/service/issues/289"
},
{
"type": "WEB",
"url": "https://github.com/kardianos/service/pull/290"
},
{
"type": "PACKAGE",
"url": "https://github.com/kardianos/service"
}
],
"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"
}
],
"summary": "Disputed: OS Command injection in github.com/kardianos/service",
"withdrawn": "2023-05-24T17:39:14Z"
}
GHSA-XM9H-Q2F5-RQ5X
Vulnerability from github – Published: 2022-05-24 16:50 – Updated: 2022-05-24 16:50A vulnerability in the London Trust Media Private Internet Access (PIA) VPN Client v82 for macOS could allow an authenticated, local attacker to run arbitrary code with elevated privileges. The openvpn_launcher binary is setuid root. This program is called during the connection process and executes several operating system utilities to configure the system. The networksetup utility is called using relative paths. A local unprivileged user can execute arbitrary commands as root by creating a networksetup trojan which will be executed during the connection process. This is possible because the PATH environment variable is not reset prior to executing the OS utility.
{
"affected": [],
"aliases": [
"CVE-2019-12576"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-07-11T20:15:00Z",
"severity": "HIGH"
},
"details": "A vulnerability in the London Trust Media Private Internet Access (PIA) VPN Client v82 for macOS could allow an authenticated, local attacker to run arbitrary code with elevated privileges. The openvpn_launcher binary is setuid root. This program is called during the connection process and executes several operating system utilities to configure the system. The networksetup utility is called using relative paths. A local unprivileged user can execute arbitrary commands as root by creating a networksetup trojan which will be executed during the connection process. This is possible because the PATH environment variable is not reset prior to executing the OS utility.",
"id": "GHSA-xm9h-q2f5-rq5x",
"modified": "2022-05-24T16:50:07Z",
"published": "2022-05-24T16:50:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-12576"
},
{
"type": "WEB",
"url": "https://github.com/mirchr/security-research/blob/master/vulnerabilities/PIA/CVE-2019-12576.txt"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XMVV-W44W-J8WX
Vulnerability from github – Published: 2025-03-17 15:31 – Updated: 2025-03-17 21:27Mattermost Desktop App versions <=5.10.0 explicitly declared unnecessary macOS entitlements which allows an attacker with remote access to bypass Transparency, Consent, and Control (TCC) via code injection.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "mattermost-desktop"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.11.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-1398"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-17T21:27:32Z",
"nvd_published_at": "2025-03-17T15:15:43Z",
"severity": "LOW"
},
"details": "Mattermost Desktop App versions \u003c=5.10.0 explicitly declared unnecessary macOS entitlements which allows an attacker with remote access to bypass Transparency, Consent, and Control (TCC) via code injection.",
"id": "GHSA-xmvv-w44w-j8wx",
"modified": "2025-03-17T21:27:32Z",
"published": "2025-03-17T15:31:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1398"
},
{
"type": "PACKAGE",
"url": "https://github.com/mattermost/desktop"
},
{
"type": "WEB",
"url": "https://mattermost.com/security-updates"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Mattermost Desktop App allows the bypass of Transparency, Consent, and Control (TCC) via code injection"
}
GHSA-XPC2-X3MG-53CV
Vulnerability from github – Published: 2022-05-17 00:18 – Updated: 2022-05-17 00:18VMware Workstation (12.x before 12.5.8) installer contains a DLL hijacking issue that exists due to some DLL files loaded by the application improperly. This issue may allow an attacker to load a DLL file of the attacker's choosing that could execute arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2017-4939"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-11-17T21:29:00Z",
"severity": "HIGH"
},
"details": "VMware Workstation (12.x before 12.5.8) installer contains a DLL hijacking issue that exists due to some DLL files loaded by the application improperly. This issue may allow an attacker to load a DLL file of the attacker\u0027s choosing that could execute arbitrary code.",
"id": "GHSA-xpc2-x3mg-53cv",
"modified": "2022-05-17T00:18:39Z",
"published": "2022-05-17T00:18:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-4939"
},
{
"type": "WEB",
"url": "https://www.vmware.com/security/advisories/VMSA-2017-0018.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/101890"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XQ43-HQR9-PHRP
Vulnerability from github – Published: 2022-05-13 01:23 – Updated: 2022-05-13 01:23Dashlane might allow local users to gain privileges by placing a Trojan horse WINHTTP.dll in the %APPDATA%\Dashlane directory.
{
"affected": [],
"aliases": [
"CVE-2017-11657"
],
"database_specific": {
"cwe_ids": [
"CWE-426"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-08-04T14:29:00Z",
"severity": "HIGH"
},
"details": "Dashlane might allow local users to gain privileges by placing a Trojan horse WINHTTP.dll in the %APPDATA%\\Dashlane directory.",
"id": "GHSA-xq43-hqr9-phrp",
"modified": "2022-05-13T01:23:13Z",
"published": "2022-05-13T01:23:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-11657"
},
{
"type": "WEB",
"url": "https://blogs.securiteam.com/index.php/archives/3357"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/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.