Improper neutralisation of expression or command delimiters happens when input can introduce operators, quotes, pipes, semicolons, or other syntax that changes an interpreted expression or shell command. Attackers use this to inject logic or execute commands. Defenders should avoid interpreter construction from input, escape for the exact context, and restrict execution paths.
Why the Delimiter Becomes the Vulnerability
The issue starts when an application treats user input as part of a grammar instead of as plain data. If a quote, pipe, semicolon, parenthesis, or other delimiter is not neutralised for the exact interpreter, the input can close one token and begin another. That is what turns a normal value into executable syntax.
This failure is not limited to shells. It applies wherever an expression parser, template engine, query language, or command interpreter changes meaning based on delimiter characters. The weakness is the boundary itself, because the parser is allowed to reinterpret attacker-controlled text as structure rather than content.
How Injection Happens in Practice
Improper neutralisation usually appears in code that concatenates strings into a command or expression and then hands the result to an interpreter. A crafted input can terminate the intended argument, add a new operator, or chain a second command. In web application terms, this is the same family of weakness as command injection and delimiter-based injection patterns discussed in the Web Application Attacks Guide.
The exact exploitability depends on the target syntax. Some contexts need escaping of quotes, some need delimiter encoding, and some need complete removal of metacharacter handling. If the application guesses at escaping rules instead of matching the target grammar precisely, attackers can often find an alternate syntax that still parses as code.
What Good Defenses Actually Change
The safest pattern is to avoid building interpreted expressions from user input at all. When interpretation is unavoidable, the application should use context-aware escaping, strict allowlists, and APIs that pass data as separate arguments rather than as a single command string. Guidance on classes of dangerous input handling is central to the CWE Top 25 Guide, because delimiter mistakes are typically root-cause weaknesses rather than isolated bugs.
Defenders should also reduce the number of places where interpretation occurs. Every extra parser, wrapper script, or shell hop creates another chance for delimiter handling to fail. The more layers that inspect the same text, the more important it becomes to know exactly which layer owns quoting, escaping, and validation.
Risk and Threat Considerations
Delimiter-neutralisation flaws are high impact because they can convert a simple input field into an execution path. The attacker goal is usually to change program logic, invoke a different function, or reach operating-system command execution through a parser that was never meant to trust user-controlled syntax.
Failure mechanism: The application concatenates untrusted input into an interpreted expression or shell command, and the interpreter accepts attacker-supplied delimiters as structure instead of literal data.
Impact: The result can be logic manipulation, command execution, data exposure, or chaining into broader system compromise, especially where the process runs with elevated privileges or has access to sensitive files, services, or secrets.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP API Security Top 10 address the attack and risk surface, while OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V5 — File Handling | Delimiter injection often appears where input is passed into interpreter-like processing. |
| V15 — Secure Coding and Architecture | String concatenation into interpreters is a secure design flaw. | |
| Recommendation — Use context-safe APIs that keep user input out of interpreted command strings. Redesign execution paths so input is handled as data, not syntax. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | This weakness is addressed through secure coding and injection-resistant design. |
| Recommendation — Review code paths that build commands or expressions from untrusted input. | ||
| MITRE ATT&CK | T1059 — Command and Scripting Interpreter | The weakness can enable attacker-controlled command or script execution. |
| Recommendation — Detect and block unexpected interpreter use from web or application inputs. | ||
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Unsafe parser or shell exposure often stems from insecure configuration and input handling. |
| Recommendation — Harden exposed interfaces so they do not accept raw interpreter syntax. | ||
Practitioner Guidance
What to verify: Confirm whether the input ever reaches a shell, expression evaluator, template engine, or query parser as a string that can still be reinterpreted. If it does, treat the call site as unsafe until proven otherwise, even if the input appears to be filtered.
Decision rule: If the code can be rewritten to pass structured arguments or use a non-interpreted API, do that first. If you must keep an interpreter, apply escaping rules for that exact context and test with delimiter, quoting, and chaining payloads rather than generic “special character” cases.
Practitioner takeaway: The control objective is not to block every unusual character, it is to stop untrusted text from becoming executable syntax in the first place.
Related resources from NHI Mgmt Group
- What causes improper neutralisation of delimiters?
- Improper Neutralization of Expression/Command Delimiters
- Is CVE-2026-86060 (MikroTik RouterOS Improper Neutralization of Argument Delimiters in a Command) being exploited in the wild?
- How do you patch or mitigate CVE-2026-86060 (MikroTik RouterOS Improper Neutralization of Argument Delimiters in a Command)?