CWE-114: Process Control
Executing commands or loading libraries from an untrusted source or in an untrusted environment can cause an application to execute malicious commands (and payloads) on behalf of an attacker.
Last updated
Overview
Process control vulnerabilities take two forms: An attacker can change the command that the program executes: the attacker explicitly controls what the command is. An attacker can change the environment in which the command executes: the attacker implicitly controls what the command means. Process control vulnerabilities of the first type occur when either data enters the application from an untrusted source and the data is used as part of a string representing a command that is executed by the application. By executing the command, the application gives an attacker a privilege or capability that the attacker would not otherwise have.
Real-world CVEs
24 recorded CVEs are caused by CWE-114 (Process Control), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 1 new CWE-114 CVE has been recorded so far in 2026 (7 in 2025).
- CVE-2022-23748CISA KEVHigh · CVSS 8.4 · EPSS 95th2022-11-17
- CVE-2025-36250
AIX Code Execution
Critical · CVSS 10.0 · EPSS 47th2025-11-13 - CVE-2024-56346
IBM AIX command execution
Critical · CVSS 10.0 · EPSS 61th2025-03-18 - CVE-2020-11075Critical · CVSS 9.9 · EPSS 77th2020-05-27
- CVE-2025-36251
AIX Command Execution
Critical · CVSS 9.8 · EPSS 41th2025-11-13 - CVE-2025-0160
IBM FlashSystem code execution
Critical · CVSS 9.8 · EPSS 39th2025-02-28 - CVE-2024-56347
IBM AIX command execution
Critical · CVSS 9.6 · EPSS 54th2025-03-18 - CVE-2025-1950
IBM Hardware Management Console - Power Systems command execution
Critical · CVSS 9.3 · EPSS 9th2025-04-22 - CVE-2024-25021
IBM AIX command execution
High · CVSS 8.4 · EPSS 19th2024-02-22 - CVE-2024-32004
Git vulnerable to Remote Code Execution while cloning special-crafted local repositories
High · CVSS 8.2 · EPSS 67th2024-05-14 - CVE-2020-8107High · CVSS 8.2 · EPSS 25th2022-02-18
- CVE-2020-11081High · CVSS 8.2 · EPSS 44th2020-07-10
Showing 12 of 24 recorded CWE-114 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-114 vulnerabilitiesCommon consequences
What can happen when CWE-114 is exploited.
Execute Unauthorized Code or Commands
Affects: Confidentiality, Integrity, Availability
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-114, grouped by where in the lifecycle they apply.
Libraries that are loaded should be well understood and come from a trusted source. The application can execute code contained in the native libraries, which often contain calls that are susceptible to other security problems, such as buffer overflows or command injection. All native libraries should be validated to determine if the application requires the use of the library. It is very difficult to determine what these native libraries actually do, and the potential for malicious code is high. In addition, the potential for an inadvertent mistake in these native libraries is also high, as many are written in C or C++ and may be susceptible to buffer overflow or race condition problems. To help prevent buffer overflow attacks, validate all input to native calls for content and length. If the native library does not come from a trusted source, review the source code of the library. The library should be built from the reviewed source before using it.
How to detect it
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
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
The following code uses System.loadLibrary() to load code from a native library named library.dll, which is normally found in a standard system directory.
The problem here is that System.loadLibrary() accepts a library name, not a path, for the library to be loaded. From the Java 1.4.2 API documentation this function behaves as follows [1]: A file containing native code is loaded from the local file system from a place where library files are conventionally obtained. The details of this process are implementation-dependent. The mapping from a library name to a specific filename is done in a system-specific manner. If an attacker is able to place a malicious copy of library.dll higher in the search order than file the application intends to load, then the application will load the malicious copy instead of the intended file. Because of the nature of the application, it runs with elevated privileges, which means the contents of the attacker's library.dll will now be run with elevated privileges, possibly giving them complete control of the system.
The following code from a privileged application uses a registry entry to determine the directory in which it is installed and loads a library file based on a relative path from the specified directory.
The code in this example allows an attacker to load an arbitrary library, from which code will be executed with the elevated privilege of the application, by modifying a registry key to specify a different path containing a malicious version of INITLIB. Because the program does not validate the value read from the environment, if an attacker can control the value of APPHOME, they can fool the application into running malicious code.
The following code is from a web-based administration utility that allows users access to an interface through which they can update their profile on the system. The utility makes use of a library named liberty.dll, which is normally found in a standard system directory.
Vulnerable example
LoadLibrary("liberty.dll");The problem is that the program does not specify an absolute path for liberty.dll. If an attacker is able to place a malicious library named liberty.dll higher in the search order than file the application intends to load, then the application will load the malicious copy instead of the intended file. Because of the nature of the application, it runs with elevated privileges, which means the contents of the attacker's liberty.dll will now be run with elevated privileges, possibly giving the attacker complete control of the system. The type of attack seen in this example is made possible because of the search order used by LoadLibrary() when an absolute path is not specified. If the current directory is searched before system directories, as was the case up until the most recent versions of Windows, then this type of attack becomes trivial if the attacker can execute the program locally. The search order is operating system version dependent, and is controlled on newer operating systems by the value of the registry key: HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
Terminology & mappings
Mapped taxonomies
- 7 Pernicious Kingdoms: Process Control
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-114.
- What is CWE-114?
- Executing commands or loading libraries from an untrusted source or in an untrusted environment can cause an application to execute malicious commands (and payloads) on behalf of an attacker.
- What CVEs are caused by CWE-114?
- 24 recorded CVEs are attributed to CWE-114, including CVE-2022-23748, CVE-2025-36250, CVE-2024-56346. 1 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- How do you prevent CWE-114?
- Libraries that are loaded should be well understood and come from a trusted source. The application can execute code contained in the native libraries, which often contain calls that are susceptible to other security problems, such as buffer overflows or command injection. All native libraries should be validated to determine if the application requires the use of the library. It is very difficult to determine what these native libraries actually do, and the potential for malicious code is high. In addition, the potential for an inadvertent mistake in these native libraries is also high, as many are written in C or C++ and may be susceptible to buffer overflow or race condition problems. To help prevent buffer overflow attacks, validate all input to native calls for content and length. If the native library does not come from a trusted source, review the source code of the library. The library should be built from the reviewed source before using it.
- How is CWE-114 detected?
- 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.)
- What are the consequences of CWE-114?
- Exploiting CWE-114 can lead to: Execute Unauthorized Code or Commands.
- Is CWE-114 actively exploited?
- Yes. 1 CWE-114 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 24 recorded CVEs.
References
- MITRE CWE definition (CWE-114) (opens in a new tab)
- CWE-114 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-114
Get alerted the moment a new CWE-114 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.