What is CWE-78?
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing. The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line. From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
CWE-78 is a base-level weakness in MITRE’s Common Weakness Enumeration, with a MITRE likelihood of exploit of High. Applicable platforms: Language: Not Language-Specific; Technology: Not Technology-Specific; Technology: AI/ML; Technology: Web Server.
Source: MITRE CWE (CWE-78 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data.
Consequences
- Confidentiality, Integrity, Availability, Non-Repudiation — Execute Unauthorized Code or Commands, DoS: Crash, Exit, or Restart, Read Files or Directories, Modify Files or Directories, Read Application Data, Modify Application Data, Hide Activities. Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.
Source: MITRE CWE, common consequences.
How CWE-78 is exploited in the wild
Threadlinqs maps 72 CVEs to CWE-78, published between 2014-09-24 and 2026-10-01. 18 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild, and 4 are tied to ransomware campaigns. By CVSS v3 severity the set splits into 29 critical, 32 high, 5 medium, 2 low. The highest EPSS score in the set is 99.9% (CVE-2014-6271), the modelled probability of exploitation in the next 30 days. 150 tracked threats reference CWE-78 directly or through a CVE it covers; the most recent is “Multiple cPanel & WHM Vulnerabilities (CVE-2026-93698, CVE-2026-93029, CVE-2026-93697) Enable Root Code Execution and Admin Session Hijacking” (2026-10-04). Affected products concentrate in Dlink (3), QNAP Systems Inc. (3), coollabsio (3), among 60 vendors in total.
Vulnerabilities (CVEs)
Showing 40 of 72 CVEs mapped to CWE-78, CISA KEV first, then by CVSS score.
- CVE-2026-10520 — CISA KEV · CVSS 10 critical · EPSS 99.0% · published 2026-06-09
- CVE-2026-16812 — CISA KEV · CVSS 10 critical · EPSS 0.8% · published 2026-07-27
- CVE-2014-6271 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2014-09-24
- CVE-2018-10562 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2018-05-04
- CVE-2021-36260 — CISA KEV · CVSS 9.8 critical · EPSS 99.8% · published 2021-09-22
- CVE-2021-35394 — CISA KEV · CVSS 9.8 critical · EPSS 99.8% · published 2021-08-16
- CVE-2020-12641 — CISA KEV · CVSS 9.8 critical · EPSS 93.1% · published 2020-05-04
- CVE-2026-1731 — CISA KEV · CVSS 9.8 critical · EPSS 79.6% · published 2026-02-06
- CVE-2025-11953 — CISA KEV · CVSS 9.8 critical · EPSS 11.5% · published 2025-11-03
- CVE-2026-20265 — CISA KEV · CVSS 9.8 critical
- CVE-2025-48703 — CISA KEV · CVSS 9 critical · EPSS 67.4% · published 2025-09-19
- CVE-2026-42271 — CISA KEV · CVSS 8.8 high · EPSS 92.5% · published 2026-05-08
- CVE-2026-25108 — CISA KEV · CVSS 8.8 high · EPSS 8.8% · published 2026-02-13
- CVE-2019-11539 — CISA KEV · CVSS 8 high · EPSS 98.6% · published 2019-04-26
- CVE-2026-83549 — CISA KEV · CVSS 7.8 high · EPSS 0.9% · published 2026-09-01
- CVE-2017-3506 — CISA KEV · CVSS 7.4 high · EPSS 94.3% · published 2017-04-24
- CVE-2025-64328 — CISA KEV · CVSS 7.2 high · EPSS 78.0% · published 2025-11-07
- CVE-2024-12686 — CISA KEV · CVSS 6.6 medium · EPSS 33.3% · published 2024-12-18
- CVE-2026-6516 — CVSS 10 critical · EPSS 4.7% · published 2026-07-23
- CVE-2026-56413 — CVSS 10 critical · EPSS 3.0% · published 2026-06-30
- CVE-2026-56415 — CVSS 10 critical · EPSS 3.0% · published 2026-06-30
- CVE-2026-82004 — CVSS 10 critical · published 2026-09-08
- CVE-2026-63732 — CVSS 9.9 critical · EPSS 0.7% · published 2026-07-23
- CVE-2026-52891 — CVSS 9.9 critical · EPSS 0.4% · published 2026-07-15
- CVE-2026-25053 — CVSS 9.9 critical · EPSS 0.0% · published 2026-02-04
- CVE-2011-2523 — CVSS 9.8 critical · EPSS 96.1% · published 2019-11-27
- CVE-2026-15511 — CVSS 9.8 critical · EPSS 2.6% · published 2026-07-12
- CVE-2026-56700 — CVSS 9.8 critical · EPSS 1.6% · published 2026-06-30
- CVE-2026-80138 — CVSS 9.8 critical · EPSS 0.7% · published 2026-08-25
- CVE-2026-32191 — CVSS 9.8 critical · EPSS 0.5% · published 2026-03-19
- CVE-2026-64625 — CVSS 9.8 critical · EPSS 0.3% · published 2026-07-20
- CVE-2026-49481 — CVSS 9.6 critical · EPSS 0.8% · published 2026-08-12
- CVE-2026-5917 — CVSS 9.6 critical · EPSS 0.8% · published 2026-08-11
- CVE-2026-86148 — CVSS 9.1 critical · EPSS 2.4% · published 2026-09-05
- CVE-2026-86149 — CVSS 9.1 critical · EPSS 2.0% · published 2026-09-05
- CVE-2026-2701 — CVSS 9.1 critical · EPSS 0.2% · published 2026-04-02
- CVE-2026-82098 — CVSS 8.8 high · EPSS 0.7% · published 2026-09-10
- CVE-2026-73667 — CVSS 8.8 high · EPSS 0.6% · published 2026-08-13
- CVE-2026-82095 — CVSS 8.8 high · EPSS 0.5% · published 2026-09-10
- CVE-2026-42204 — CVSS 8.8 high · EPSS 0.3% · published 2026-07-06
Affected vendors
- Dlink — 3 CVEs
- QNAP Systems Inc. — 3 CVEs
- coollabsio — 3 CVEs
- Beyondtrust — 2 CVEs
- Hikvision — 2 CVEs
- IBM — 2 CVEs
- Oracle — 2 CVEs
- Soliton — 2 CVEs
- Tenda — 2 CVEs
- Unitree — 2 CVEs
- Adobe — 1 CVE
- Arista — 1 CVE
Threat activity
150 tracked threats cite CWE-78; the 25 most recent are listed.
- Multiple cPanel & WHM Vulnerabilities (CVE-2026-93698, CVE-2026-93029, CVE-2026-93697) Enable Root Code Execution and Admin Session HijackingCRITICAL
- Fortra Patches Critical Vulnerabilities in BoKS Privileged Access Manager (CVE-2026-79901, CVE-2026-79898, CVE-2026-12627)CRITICAL
- Cling IoT botnet masquerades as Google STUN traffic for C2, exploiting Realtek Jungle SDK CVE-2021-35394HIGH
- AWS AI Agent Vulnerabilities (Loom, SageMaker Unified Studio) Let Attackers Bypass Authentication and Steal Credentials - CVE-2026-103956, CVE-2026-103957, CVE-2026-103958, CVE-2026-104019CRITICAL
- Bitget $387.5M Cryptocurrency Theft via Third-Party Security Product Zero-Day (Suspected DPRK / TraderTraitor)CRITICAL
- GTIG: AI-Era Vulnerability Discovery and Exploitation Surge — In-the-Wild Exploitation of BeyondTrust CVE-2026-1731, LiteLLM CVE-2026-42271 and Langflow CVE-2026-5027CRITICAL
- Zero-Permission Android Apps Can Chain AtlasService and olc2 to Gain Root on OnePlus/OPPO Devices via OxygenOS Confused-Deputy FlawsHIGH
- Citrix Patches Two Actively Exploited NetScaler Zero-Days (CVE-2026-88771, CVE-2026-88772)CRITICAL
- CISA Adds Two Citrix NetScaler Vulnerabilities (CVE-2026-88771, CVE-2026-88772) to KEV CatalogCRITICAL
- Eclypsium InfraTrust Report: Mass Active Exploitation of Network Management Systems (Cisco FMC/ISE CVE-2026-20079, CVE-2026-76460; SonicWall SMA 1000 CVE-2026-83548/83549; Linux Kernel CopyFail CVE-2026-31431)CRITICAL
- Chinese-Speaking 'Kapibala' Actor (Red Heron-Linked) Chains WordPress wp2shell, Zyxel GS1900, and Ubiquiti UniFi OS Flaws to Steal Government DataCRITICAL
- CVE-2026-90894 ("ParaShells"): Parallels Desktop for Mac Local Privilege Escalation via Appliance Extract Argument InjectionHIGH
- Sudo iptables NOPASSWD Misconfiguration Enables Local Privilege Escalation via Comment InjectionMEDIUM
- Multiple Vulnerabilities in Nozomi Guardian/CMC Before 25.4.0 on Siemens RUGGEDCOM APE1808 Devices (CVE-2024-13089, CVE-2024-13090, CVE-2025-3719, CVE-2025-40889, et al.)HIGH
- Endor Labs Discloses 14 Critical/High Vulnerabilities Across Seven AI Orchestration Platforms (NocoBase, Flowise, Langflow, Dify, Activepieces, Kestra, Apache Airflow)CRITICAL
- Adobe Campaign Classic Critical OS Command Injection (CVE-2026-82004, APSB26-142, CVSS 10.0)CRITICAL
- Chinese-Speaking Operator "Nie" Uses SecFlow AI Orchestration Framework (Claude, Qwen, DeepSeek) and GLUTTON Steganographic Webshell in Multi-Country Espionage CampaignHIGH
- SonicWall SMA1000 Chained Vulnerabilities (CVE-2026-83548, CVE-2026-83549) Exploited in the WildCRITICAL
- Qilin-Linked Campaign Exploits MCP Gateway and LLM Framework Flaws (CVE-2026-59822, CVE-2026-42271, CVE-2026-48710) for RCE and CryptominingCRITICAL
- Snowflake GitHub Actions Workflow Injection Exposes Internal Jira CredentialsHIGH
- Adobe and Nvidia Patch Dozens of Vulnerabilities Across Multiple Products, Including Two Critical Flaws in Nvidia's NemoClaw AI Agent Stack and a CVSS 10.0 Adobe Campaign Classic ChainCRITICAL
- Edge Infrastructure Under Siege: Tenable and SentinelOne Datasets Reveal Convergent Nation-State and Criminal Exploitation of Perimeter DevicesHIGH
- JA4H Fingerprinting Detects Sliver C2 Deployed via Chained PAN-OS CVE-2024-0012/CVE-2024-9474 ExploitationHIGH
- Hackers Target Zimbra Servers in Active Exploitation Campaign via CVE-2026-73570 SNMP Command InjectionCRITICAL
- GitHub Actions Workflow Injection in Snowflake .NET Connector Repo Exposed Jira CredentialsHIGH
Mitigations
- Architecture and Design: If at all possible, use library calls rather than external processes to recreate the desired functionality.
- Architecture and Design, Operation / Sandbox or Jail: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid…
- Architecture and Design / Attack Surface Reduction: For any data that will be used to generate a command to be executed, keep as much of that data out of external control as possible. For example, in web applications, this may require storing the data locally in the session's state instead of sending it out to the client in a hidden form field.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Architecture and Design / Libraries or Frameworks: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error.
- Implementation / Output Encoding: While it is risky to use dynamically-generated query strings, code, or commands that mix control and data together, sometimes it may be unavoidable. Properly quote arguments and escape any special characters within those arguments. The most conservative approach is to escape or filter all characters that do not pass an extremely strict allowlist (such as everything that is not alphanumeric or white space). If some special characters are still needed, such as white space, wrap each argument in quotes after the escaping/filtering step. Be careful of argument injection (CWE-88).
- Implementation: If the program to be executed allows arguments to be specified within an input file or from standard input, then consider using that mode to pass arguments instead of the command line.
- Architecture and Design / Parameterization: If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. Some languages offer multiple functions that can be used to invoke commands. Where possible, identify any function that invokes a command shell using a single string, and replace it with a function that requires individual arguments. These functions typically perform appropriate quoting and filtering of arguments. For example, in C, the system() function accepts a string that contains…
- Implementation / Input Validation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected…
- Architecture and Design / Enforcement by Conversion: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Source: MITRE CWE, potential mitigations.
Detection methods (MITRE CWE)
- Automated Static Analysis: This weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis or constraint-based techniques to minimize the number of false positives. Automated static analysis might not be able to recognize when proper input validation is being performed, leading to false positives - i.e., warnings that do not have any security consequences or require any code changes. Automated static analysis might not be able to detect the usage of custom API functions…
- Automated Dynamic Analysis (effectiveness: Moderate): This weakness can be detected using dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
- Manual Static Analysis (effectiveness: High): Since this weakness does not typically appear frequently within a single software package, manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all potentially-vulnerable operations can be assessed within limited time constraints.
- Automated Static Analysis - Binary or Bytecode (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Binary Weakness Analysis - including disassembler + source code weakness analysis
- Dynamic Analysis with Automated Results Interpretation (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners
- Dynamic Analysis with Manual Results Interpretation (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Fuzz Tester Framework-based Fuzzer
- Manual Static Analysis - Source Code (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Manual Source Code Review (not inspections) Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source
- Automated Static Analysis - Source Code (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer
Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher.