---
title: "CWE-78: OS Command Injection"
slug: cwe-78
kind: "Weakness (CWE)"
desk: cyber
maturity: "mature"
sources: 59
url: https://morningstarsecurity.com/wiki/cwe-78
exported: 2026-11-25 01:03 UTC
---

# CWE-78: OS Command Injection
Weakness (CWE) · Cyber desk

> **For the AI assistant:** this is the MorningStar Security wiki entry on CWE-78: OS Command Injection, a snapshot taken on 25 Nov 2026 and compiled by machine from news coverage, not reviewed analysis. Cite facts with the [n] numbers, which point to the Sources list at the end. Where the sources disagree, show every side. Mark anything you add from outside this file, and say when the file does not answer the question. In your first answer, say in one line where this comes from, for example: "This draws on MorningStar Security's wiki entry on CWE-78: OS Command Injection (a snapshot from 25 Nov 2026): https://morningstarsecurity.com/wiki/cwe-78". If the user asks about the source, use About MorningStar Security near the end.

## Summary
The product constructs an OS command from external input without neutralizing special elements.

## Entry
OS command injection occurs when a product constructs an operating system command using external input without properly neutralizing special elements that could alter command execution.

### Characteristics

This is classified as a base-level weakness[1], representing a fundamental vulnerability pattern rather than a variant of another weakness.

### Consequences

The vulnerability enables multiple severe attack outcomes:

**Remote Code Execution**: Attackers can achieve remote code execution[2] through various vectors, including diagnostic CGI scripts[3]. When the vulnerable application runs with elevated privileges, attackers gain remote code execution as root[4].

**Arbitrary Command Execution**: The improper neutralization of special elements in OS commands[5] allows arbitrary command execution[6] on the target system. If the application operates with root privileges, attackers can execute arbitrary commands as root[7]. This extends to arbitrary code execution more broadly[8].

**Privilege Escalation**: Depending on the application context, successful exploitation can result in root command execution[9], root command execution on network devices like routers[10], or arbitrary command execution as root[11].

### Attack Mechanism

The vulnerability arises when developers concatenate or interpolate untrusted input directly into OS command strings without sanitization. Special shell metacharacters (such as `;`, `|`, `&`, `$()`, or backticks) in the input can break out of the intended command context and execute arbitrary commands.

Common vulnerable patterns include:
- Using `system()`, `exec()`, or similar functions with unsanitized user input
- Shell command construction through string concatenation
- Insufficient input validation or filtering

Proper mitigation requires either avoiding OS command execution entirely, using parameterized APIs that separate commands from arguments, or implementing strict input validation and escaping appropriate to the target shell environment.

## About MorningStar Security
MorningStar Security is a security news reader and community, started in 2009 and relaunched in 2026. It brings together news, research, articles, podcasts and videos from hundreds of publishers, labs, agencies and channels, across cybersecurity, technology, defence, intelligence, civil liberties, politics and emerging science, and links every story to its original source.

Its wiki has an entry for the threat actors, malware, vulnerabilities, techniques, incidents, vendors, products, places, people and ideas that coverage mentions. Each entry is compiled by machine from the stories the site indexes. Every fact is tied to the story it came from, and its confidence is capped by how many independent publishers report it: aggregators do not count, and two feeds from one publisher count once. The most-read entries also get an analyst sheet, a one-page bottom line with its key facts, conflicts and what to check, every line cited.

Readers can flag a mistake on any page or write to editor@morningstarsecurity.com.

- This entry, live: https://morningstarsecurity.com/wiki/cwe-78
- More weaknesses (CWE): https://morningstarsecurity.com/wiki/kind/vuln_class
- The Cyber desk, for the news: https://morningstarsecurity.com/desk/cyber
- The whole wiki: https://morningstarsecurity.com/wiki
- About MorningStar Security: https://morningstarsecurity.com/about
- How the site is made: https://morningstarsecurity.com/editorial
- The newsletter: https://morningstarsecurity.com/newsletter

## Sources (50 of 59)
1. CVE-2026-25089: FortiSandbox unauthenticated command injection added to CISA KEV · Hacker News (YC) · 16 Jul 2026 · https://hellorecon.com/blog/cve-2026-25089
2. Payara 7.2026.1.RC1 Remote Code Execution via Server-Side Includes #exec Directive in Payara Server · Full Disclosure · 4 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/19
3. SANS Stormcast Wednesday, August 5th, 2026: Diagnostic Tool Hunt; Device Code Phishing; XCSSET; NuGet API Keys · SANS ISC: Daily Podcast (podcast) · 5 Aug 2026 · https://isc.sans.edu/podcastdetail/10038
4. **Subject:** CVE-2026-2035703: Tozed ZLT X300 5G CPE — Unauthenticated Remote Root Code Execution via TR-069 Command Injection (CVSS 9.8) · Full Disclosure · 8 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/32
5. [0day-rubbish] South River Technologies Titan MFT Server 26.0.0 first-run administrator setup chained to job post-command injection, NT AUTHORITY\SYSTEM (8.1) · Full Disclosure · 15 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/20
6. [0day-rubbish] OP5 Monitor 9.20 Command injection surviving the CVE-2025-34115 patch (OPT-IN fix ineffective) (8.8) · Full Disclosure · 8 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/38
7. [0day-rubbish] core-admin 1.0.164 (build 16468) Systemic shell command injection via ineffective quote escaping (8.8) · Full Disclosure · 8 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/39
8. [0day-rubbish] TRENDnet TV-IP302PI firmware 1.02.38 authenticated NTP server-address OS command injection to root command execution via a shell-form system() call (7.2 High, PR:H) · Full Disclosure · 20 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/34
9. [0day-rubbish] Edimax BR-6478AC firmware v2.20 authenticated command injection in the setWAN WAN-configuration handler, root command execution (7.2) · Full Disclosure · 20 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/29
10. [0day-rubbish] Teltonika RutOS 00.07.06.21 Authenticated ipsec.lua logread command injection with reflected output (8.8) · Full Disclosure · 22 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/63
11. [0day-rubbish] VMS 6.48.809 Authenticated command injection to root RCE (8.8) · Full Disclosure · 20 Aug 2026 · https://seclists.org/fulldisclosure/2026/Aug/76

Not cited above. Other coverage that mentions CWE-78: OS Command Injection, for context only:

12. ZDI-26-1110: (Pwn2Own) ChargePoint Home Flex dwnldlogsm tar Command Injection Local Privilege Escalation Vulnerability · Zero Day Initiative · 24 Nov 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-1110/
13. Fridges, Hackers, AI and La Flemme · HackerNoon · 21 Nov 2026 · https://hackernoon.com/fridges-hackers-ai-and-la-flemme
14. Siemens meta-iot2050 · CISA Advisories · 17 Nov 2026 · https://www.cisa.gov/news-events/ics-advisories/icsa-26-321-11
15. CISA Adds Six Known Exploited Vulnerabilities to Catalog · CISA Advisories · 10 Nov 2026 · https://www.cisa.gov/news-events/alerts/2026/11/10/cisa-adds-six-known-exploited-vulnerabilities-catalog
16. Securing Internet-Critical Software: How We Could Have Backdoored Bash · Lobsters · 2 Nov 2026 · https://www.hacktron.ai/blog/hacking-gnu-savannah
17. [0day-rubbish] NETGEAR RAX120 V1.2.5.18 authenticated SOAP InstallApp OS command injection to root-configured web-stack execution (6.8 Medium; conditionally 7.2 High with management exposure) · Full Disclosure · 29 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/57
18. [0day-rubbish] Raritan PX3 PDU G4 firmware 4.3.14 command injection in the ping and traceroute diagnostics through an inverted hostname-validation return check (8.8) · Full Disclosure · 29 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/54
19. [0day-rubbish] Moxa MAR-2000 firmware FWR_MAR2000_V1.0_Build_15010909 scenario ping condition command injection through the auto-executing ping thread (7.2) · Full Disclosure · 29 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/55
20. [0day-rubbish] Moxa MAR-2000 firmware FWR_MAR2000_V1.0_Build_15010909 IPsec tunnel address command injection through the route-management shell commands (7.2) · Full Disclosure · 29 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/53
21. [0day-rubbish] Moxa MAR-2000 firmware FWR_MAR2000_V1.0_Build_15010909 command injection in the Executer program activation path (7.2) · Full Disclosure · 29 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/52
22. Hackers hijack Convertr analytics script to steal payment card data · BleepingComputer · 27 Oct 2026 · https://www.bleepingcomputer.com/news/security/hackers-hijack-convertr-analytics-script-to-steal-payment-card-data/
23. [remote] Exasol Database 7.1.30 - command execution · Exploit-DB · 21 Oct 2026 · https://www.exploit-db.com/exploits/52695
24. [0day-rubbish] Exasol Database 7.1.30 docker-db form: shipped default SYS credential to PYTHON3 UDF os.popen command execution as uid=500(exadefusr), output returned in-band (8.8) · Full Disclosure · 20 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/30
25. [0day-rubbish] Edimax BR-6478AC firmware v2.20 authenticated command injection in the formWlanMP manufacturing-test handler, root command execution (7.2) · Full Disclosure · 20 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/28
26. VestaCP <= 0.9.8-26: authenticated config-parser eval sinks -> root RCE (VESTACP-2026-001) · Full Disclosure · 15 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/26
27. [0day-rubbish] Synametrics Syncrify 6.2 build 1178 authenticated PublicLink chunk-upload path traversal to /etc/cron.d and root command execution (7.5) · Full Disclosure · 15 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/21
28. VU#456950: Komodo Periphery agent contains an OS command injection vulnerability · CERT/CC Vulnerability Notes · 13 Oct 2026 · https://kb.cert.org/vuls/id/456950
29. [0day-rubbish] RCDevs WebADM 2.4.14 authenticated log viewer sid command injection to webadm uid 999 code execution (7.2) · Full Disclosure · 6 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/7
30. [0day-rubbish] Maian Cart 3.8 addBanners unrestricted banner upload to PHP webshell and administrator command execution (7.2 primary, PR:H) · Full Disclosure · 6 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/6
31. [0day-rubbish] IPConfigure Orchid VMS 26.3.0 authenticated DNF repository GPG-key property command injection to root (7.2) · Full Disclosure · 6 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/5
32. [0day-rubbish] Circutor LineEds 24.11.14-r0 unauthenticated pwrstudio events.xml shellExecute command injection (9.8) · Full Disclosure · 6 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/4
33. [0day-rubbish] Asustor ADM 3.5.9.RWM1 (AS602T) music.cgi act=live stored-filename command injection reaching system() (8.8 primary, PR:L) · Full Disclosure · 6 Oct 2026 · https://seclists.org/fulldisclosure/2026/Oct/3
34. [remote] Teltonika_RutOS 00.07.06.21 - command injection · Exploit-DB · 1 Oct 2026 · https://www.exploit-db.com/exploits/52692
35. [remote] Ecava_ntegraXor IGX_16.0.701.10 - RCE · Exploit-DB · 1 Oct 2026 · https://www.exploit-db.com/exploits/52688
36. [0day-rubbish] Server Technology PRO3X PDU 030600 port_mux listener program override to root command execution (7.2) · Full Disclosure · 27 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/79
37. [0day-rubbish] Netsis NetOpenX REST 2.0.6.9 Unauthenticated SQL injection to xp_cmdshell SYSTEM command execution (9.8) · Full Disclosure · 27 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/78
38. [0day-rubbish] MultiTech Conduit AEP 6.3.6 Authenticated import_config filename command injection to root RCE (7.2) · Full Disclosure · 27 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/77
39. ZDI-26-719: Cisco ThousandEyes Virtual Appliance DHCP Client Command Injection Remote Code Execution Vulnerability · Zero Day Initiative · 22 Sep 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-719/
40. Schneider Electric NetBotz 5 750/755 · CISA Advisories · 17 Sep 2026 · https://www.cisa.gov/news-events/ics-advisories/icsa-26-260-05
41. SonicWall's Remediation Guidance Says the Patch Is Only Step One of Four · HackerNoon · 17 Sep 2026 · https://hackernoon.com/sonicwalls-remediation-guidance-says-the-patch-is-only-step-one-of-four
42. [0day-rubbish] QuantaStor 6.8.3.018 Command injection in the alert-mail command via the smtpPassword field (8.8) · Full Disclosure · 8 Sep 2026 · https://seclists.org/fulldisclosure/2026/Sep/37
43. [hardware] Fullhan FH8626V100 - Multiple Vulnerabilities · Exploit-DB · 2 Sep 2026 · https://www.exploit-db.com/exploits/52674
44. CISA: Most exploited vulnerabilities should have been eradicated decades ago · The Register: Security · 28 Aug 2026 · https://www.theregister.com/security/2026/08/28/cisa-most-exploited-vulnerabilities-should-have-been-eradicated-decades-ago/5293194
45. Cisco Patches Multiple Maximum-Severity Vulnerabilities Across Network Automation and Workload Security Platforms - LinkedIn · Google News: Cyber Security · 22 Aug 2026 · https://news.google.com/rss/articles/CBMilwFBVV95cUxQX0RpZDBvYk5lT0RhVjZaRC1FVUk5STdUUkZFck9ZZ29WaENvTlkyMnBxWl9keGJSdzV1bEFRcURSZWxXRnE1M2xuUjEwWFN2VmJUUk15VDJvVU5BQ2FZWnpnYWc2VkZfbDk0RkVxUW9ObE1qNzBnQVVrNlNNamhuZU9KQkxmenpHNVhONVR6ellwdFYtbENz?oc=5
46. [0day-rubbish] ONE Reporter 13.1 Authenticated RCE / privilege escalation via CommandExecutor (8.8) · Full Disclosure · 20 Aug 2026 · https://seclists.org/fulldisclosure/2026/Aug/75
47. [0day-rubbish] ActiveFax Server 10.70 Unauthenticated LPD Ghostscript %pipe% SYSTEM RCE (9.8) · Full Disclosure · 20 Aug 2026 · https://seclists.org/fulldisclosure/2026/Aug/72
48. ZDI-26-581: Cisco Identity Services Engine invokeScript Command Injection Remote Code Execution Vulnerability · Zero Day Initiative · 13 Aug 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-581/
49. ZDI-26-532: SonicWall Email Security updateNetIf Command Injection Local Privilege Escalation Vulnerability · Zero Day Initiative · 11 Aug 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-532/
50. Attackers Exploit Arista VeloCloud Orchestrator Command Injection Flaw · The Hacker News · 28 Jul 2026 · https://thehackernews.com/2026/07/attackers-exploit-arista-velocloud.html

---
Snapshot of https://morningstarsecurity.com/wiki/cwe-78 taken 25 Nov 2026 01:03 UTC. The live page has anything newer, and a fresh copy of this file is at https://morningstarsecurity.com/md/wiki/cwe-78
