---
title: "CAPEC-15: Command Delimiters"
url: https://radicalnotion.ai/capec/capec-15
type: capec
description: "An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-15: Command Delimiters

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** High
- **Likelihood of attack:** High
- **CAPEC catalog version:** 3.9

## Description

An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.

## Execution flow

### Step 1: Explore

\[Assess Target Runtime Environment\] In situations where the runtime environment is not implicitly known, the attacker makes connections to the target system and tries to determine the system's runtime environment. Knowing the environment is vital to choosing the correct delimiters.

- Port mapping using network connection-based software (e.g., nmap, nessus, etc.)
- Port mapping by exploring the operating system (netstat, sockstat, etc.)
- TCP/IP Fingerprinting
- Induce errors to find informative error messages

### Step 2: Explore

\[Survey the Application\] The attacker surveys the target application, possibly as a valid and authenticated user

- Spidering web sites for all available links
- Inventory all application inputs

### Step 3: Experiment

\[Attempt delimiters in inputs\] The attacker systematically attempts variations of delimiters on known inputs, observing the application's response each time.

- Inject command delimiters using network packet injection tools (netcat, nemesis, etc.)
- Inject command delimiters using web test frameworks (proxies, TamperData, custom programs, etc.)
- Enter command delimiters directly in input fields.

### Step 4: Exploit

\[Use malicious command delimiters\] The attacker uses combinations of payload and carefully placed command delimiters to attack the software.

## Prerequisites

- Software's input validation or filtering must not detect and block presence of additional malicious command.

## Skills required

- **Medium:** The attacker has to identify injection vector, identify the specific commands, and optionally collect the output, i.e. from an interactive session.

## Resources required

- Ability to communicate synchronously or asynchronously with server. Optionally, ability to capture output directly through synchronous communication or other method such as FTP.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Availability | Execute Unauthorized Commands | Run Arbitrary Code |
| Confidentiality | Read Data | - |

## Mitigations

- Design: Perform allowlist validation against a positive specification for command length, type, and parameters.
- Design: Limit program privileges, so if commands circumvent program input validation or filter routines then commands do not running under a privileged account
- Implementation: Perform input validation for all remote content.
- Implementation: Use type conversions such as JDBC prepared statements.

## Example instances

By appending special characters, such as a semicolon or other commands that are executed by the target process, the attacker is able to execute a wide variety of malicious commands in the target process space, utilizing the target's inherited permissions, against any resource the host has access to. The possibilities are vast including injection attacks against RDBMS (SQL Injection), directory servers (LDAP Injection), XML documents (XPath and XQuery Injection), and command line shells. In many injection attacks, the results are converted back to strings and displayed to the client process such as a web browser without tripping any security alarms, so the network firewall does not log any out of the ordinary behavior. LDAP servers house critical identity assets such as user, profile, password, and group information that is used to authenticate and authorize users. An attacker that can query the directory at will and execute custom commands against the directory server is literally working with the keys to the kingdom in many enterprises. When user, organizational units, and other directory objects are queried by building the query string directly from user input with no validation, or other conversion, then the attacker has the ability to use any LDAP commands to query, filter, list, and crawl against the LDAP server directly in the same manner as SQL injection gives the ability to the attacker to run SQL commands on the database.

## Related weaknesses (CWE)

- [CWE-77](https://radicalnotion.ai/cwe/cwe-77): Improper Neutralization of Special Elements used in a Command
- [CWE-78](https://radicalnotion.ai/cwe/cwe-78): Improper Neutralization of Special Elements used in an OS Command
- [CWE-93](https://radicalnotion.ai/cwe/cwe-93): Improper Neutralization of CRLF Sequences
- [CWE-138](https://radicalnotion.ai/cwe/cwe-138): Improper Neutralization of Special Elements
- [CWE-140](https://radicalnotion.ai/cwe/cwe-140): Improper Neutralization of Delimiters
- [CWE-146](https://radicalnotion.ai/cwe/cwe-146): Improper Neutralization of Expression/Command Delimiters
- [CWE-154](https://radicalnotion.ai/cwe/cwe-154): Improper Neutralization of Variable Name Delimiters
- [CWE-157](https://radicalnotion.ai/cwe/cwe-157): Failure to Sanitize Paired Delimiters
- [CWE-184](https://radicalnotion.ai/cwe/cwe-184): Incomplete List of Disallowed Inputs
- [CWE-185](https://radicalnotion.ai/cwe/cwe-185): Incorrect Regular Expression
- [CWE-697](https://radicalnotion.ai/cwe/cwe-697): Incorrect Comparison

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-137](https://radicalnotion.ai/capec/capec-137) | Parameter Injection |
| Child | [CAPEC-460](https://radicalnotion.ai/capec/capec-460) | HTTP Parameter Pollution (HPP) |

## Frequently asked questions

### What is CAPEC-15?

An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.

### How does a Command Delimiters attack work?

It typically unfolds over 4 phases. It begins with: \[Assess Target Runtime Environment\] In situations where the runtime environment is not implicitly known, the attacker makes connections to the target system and tries to determine the system's runtime environment. Knowing the environment is vital to choosing the correct delimiters.

### How do you prevent CAPEC-15?

Design: Perform allowlist validation against a positive specification for command length, type, and parameters.

### What weaknesses does CAPEC-15 target?

CAPEC-15 exploits 11 CWE weaknesses, including CWE-77 (Improper Neutralization of Special Elements used in a Command), CWE-78 (Improper Neutralization of Special Elements used in an OS Command), CWE-93 (Improper Neutralization of CRLF Sequences) and CWE-138 (Improper Neutralization of Special Elements).

### How severe is CAPEC-15?

MITRE rates CAPEC-15 as High severity with high likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/15.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-15). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
