cve.bz

CAPEC-88

OS Command Injection

High severityHigh likelihoodStandard pattern

In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-88: OS Command Injection: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/88.html and https://cve.bz/cve/capec/88?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Identify inputs for OS commands] The attacker determines user controllable input that gets passed as part of a command to the underlying operating system.

      3 techniques
      • Port mapping. Identify ports that the system is listening on, and attempt to identify inputs and protocol types on those ports.
      • TCP/IP Fingerprinting. The attacker uses various software to make connections or partial connections and observe idiosyncratic responses from the operating system. Using those responses, they attempt to guess the actual operating system.
      • Induce errors to find informative error messages
    2. [Survey the Application] The attacker surveys the target application, possibly as a valid and authenticated user

      2 techniques
      • Spidering web sites for all available links
      • Inventory all application inputs
  2. Experiment

    They probe what they found.

    1. [Vary inputs, looking for malicious results.] Depending on whether the application being exploited is a remote or local one the attacker crafts the appropriate malicious input, containing OS commands, to be passed to the application

      2 techniques
      • Inject command delimiters using network packet injection tools (netcat, nemesis, etc.)
      • Inject command delimiters using web test frameworks (proxies, TamperData, custom programs, etc.)
  3. Exploit

    They carry out the attack.

    1. [Execute malicious commands] The attacker may steal information, install a back door access mechanism, elevate privileges or compromise the system in some other way.

      1 technique
      • The attacker executes a command that stores sensitive information into a location where they can retrieve it later (perhaps using a different command injection).

Prerequisites

  • User controllable input used as part of commands to the underlying operating system.

Skills required

  • High skill

    The attacker needs to have knowledge of not only the application to exploit but also the exact nature of commands that pertain to the target operating system. This may involve, though not always, knowledge of specific assembly commands for the platform.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Execute Unauthorized CommandsConfidentiality, Integrity, AvailabilityRun Arbitrary Code
Gain Privileges, Bypass Protection MechanismConfidentiality, Access Control, Authorization
Read DataConfidentiality

Mitigations

  • Use language APIs rather than relying on passing data to the operating system shell or command line. Doing so ensures that the available protection mechanisms in the language are intact and applicable.

  • Filter all incoming data to escape or remove characters or strings that can be potentially misinterpreted as operating system or shell commands

  • All application processes should be run with the minimal privileges required. Also, processes must shed privileges as soon as they no longer require them.

Weaknesses it exploits

  • CWE-20 Improper Input Validation
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command
  • CWE-697 Incorrect Comparison

Recent CVEs with these weaknesses

  1. 8.5CVE-2026-140041

    A flaw has been found in WAVLINK WL-WN530BE1-A M30BE1_V251117. The impacted element is the function FUN_0001f94c of the file /protocol.csp of the component ioos. Executing a manipulation of the argument mac can lead to os command injection…

  2. 8.6CVE-2026-140040

    A vulnerability was detected in WAVLINK WL-WN530BE1-A M30BE1_V251117. The affected element is the function port_forward of the file /protocol.csp of the component ioos. Performing a manipulation of the argument Name results in os command i…

  3. 5.5CVE-2026-139984

    A weakness has been identified in walinejs Waline up to 1.43.6. The affected element is an unknown function of the component OAuth Login Callback Handler. Executing a manipulation of the argument Type can lead to improper input validation.…

  4. 6.3CVE-2026-121479

    A flaw was found in sequoia-sq. This vulnerability can lead to arbitrary code execution when the tool displays suggested command hints derived from untrusted inputs, such as user identities. Because command arguments are not properly quote…

  5. 3.7CVE-2026-140099

    Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and inter…

  6. 8.8CVE-2026-75938

    A flaw was found in openshift/cluster-api-provider-ibmcloud. When the IBMPowerVSCluster.Spec.Ignition is configured, the controller embeds an IBM Identity and Access Management (IAM) bearer token directly into the PowerVS instance user-dat…

  7. 9.2CVE-2026-137199

    cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.7 and 7.1.0, Windows applications that pass untrusted arguments to commands routed through cmd.exe can be vulnerable because cross-spawn did not account…

  8. 8.3CVE-2026-137198

    cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. From 6.0.6 until 6.0.7 and from 7.0.4 until 7.1.0, Windows applications that pass untrusted arguments to commands routed through cmd.exe can be vulnerable because cr…

The newest records naming one of them. Each weakness's page lists them all.

Part of

Examples

A transaction processing system relies on code written in a number of languages. To access this functionality…

A transaction processing system relies on code written in a number of languages. To access this functionality, the system passes transaction information on the system command line.

An attacker can gain access to the system command line and execute malicious commands by injecting these commands in the transaction data. If successful, the attacker can steal information, install backdoors and perform other nefarious activities that can compromise the system and its data.

See also: A vulnerability in Mozilla Firefox 1.x browser allows an attacker to execute arbitrary commands on the UNIX/Linux operating system. The vulnerability is caused due to the shell script used to launch Firefox parsing shell commands that are enclosed within back-ticks in the URL provided via the command line. This can be exploited to execute arbitrary shell commands by tricking a user into following a malicious link in an external application which uses Firefox as the default browser (e.g. the mail client Evolution on Red Hat Enterprise Linux 4).

MITRE's words, unchanged: CAPEC-88 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.