CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

BaseDraft

The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

View on MITRE
Back to CWE Lookup

Extended Description

When creating commands using interpolation into a string, developers may assume that only the arguments/options that they specify will be processed. This assumption may be even stronger when the programmer has encoded the command in a way that prevents separate commands from being provided maliciously, e.g. in the case of shell metacharacters. When constructing the command, the developer may use whitespace or other delimiters that are required to separate arguments when the command. However, if an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer. The attacker may then be able to change the behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences.

Technical Details

Structure
Simple
Vulnerability Mapping
ALLOWED

Applicable To

Languages
PHPNot Language-Specific
Platforms

Source-backed guidance

Additional facts reviewed against primary or authoritative security sources.

Verify controls for CWE-88 with SSDF evidence

Use NIST SSDF verification and vulnerability-response practices to detect CWE-88, Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), throughout the product lifecycle. Derive review questions, static or dynamic checks, and negative tests from the CWE's causal behavior; define the components and lifecycle stages each check covers; and retain findings with enough evidence to distinguish the root cause from symptoms and impacts. Track escapes and false negatives, then improve the verification plan after every confirmed occurrence.

NIST SP 800-218 Secure Software Development FrameworkNational Institute of Standards and Technology

Apply Parameterization controls for Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

MITRE associates mitigation with Implementation, Architecture and Design, and Testing; the listed strategies include Parameterization, and Input Validation; documented detection approaches include Automated Static Analysis. Use these source-defined anchors to turn CWE-88 into implementation, review, and verification checks for the affected component.

CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')MITRE CWE

Triage CWE-88 against known exploitation evidence

Use CISA's Known Exploited Vulnerabilities catalog to test whether a vulnerability mapped to CWE-88, Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), has evidence of exploitation in the wild. Confirm the CVE-to-CWE root-cause mapping independently before attaching the example, then capture the affected product, required action, and remediation deadline. A missing KEV match is not evidence that the weakness is unexploited, and a KEV entry must not be generalized to every occurrence of this CWE.

Known Exploited Vulnerabilities CatalogCybersecurity and Infrastructure Security Agency

Apply precise root-cause mapping to CWE-88

Apply MITRE's full root-cause mapping guidance when using CWE-88, Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'). Separate weakness language from attacker prerequisites and technical impact, check the entry's abstraction and vulnerability-mapping notes, and prefer the most specific Base or Variant supported by the evidence. Record the rejected alternatives and require an independent review before the mapping is used for remediation trends or program metrics.

CVE to CWE Root Cause Mapping GuidanceMITRE CWE

Validate CWE-88 with root-cause mapping checks

Apply MITRE's root-cause mapping quick tips to CWE-88, Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'). Confirm the finding describes the causal weakness rather than an impact or attack pattern, compare the abstraction and mapping notes with plausible alternatives, and have a second reviewer challenge the selection. Preserve the evidence and reasoning so recurring defects can be measured against one consistent identifier.

CVE to CWE Root Cause Mapping Quick TipsMITRE CWE

Frequently Asked Questions

What is CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')?+

CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. When creating commands using interpolation into a string, developers may assume that only the arguments/options that they specify will be processed. This assumption may be even stronger when the programmer has encoded the command in a way that prevents separate commands from being provided maliciously, e.g. in the case of shell metacharacters. When constructing the command, the developer may use whitespace or other delimiters that are required to separate arguments when the command. However, if an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer. The attacker may then be able to change the behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences.

What are the security consequences of Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')?+

If exploited, CWE-88 (Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) it can compromise Confidentiality, Integrity, Availability and Other, leading to outcomes such as Execute Unauthorized Code or Commands, Alter Execution Logic, Read Application Data and Modify Application Data.

How do you prevent or mitigate Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')?+

Recommended mitigations for CWE-88 include: Where possible, avoid building a single string that contains the command and its arguments. Some languages or frameworks have functions that support specifying independent arguments, e.g. as an array, which is used to automatically perform the appropriate quoting or escaping while building the command. For example, in PHP, escapeshellarg() can be used to escape a single argument to system(), or exec() can be called with an array of arguments. In C, code can often be refactored from using system() - which accepts a single string - to using exec(), which requires separate function arguments for each parameter. Understand all the potential areas where untrusted inputs can enter your product: parameters or arguments, cookies, anything read from the network, environment variables, request headers as well as content, URL components, e-mail, files, databases, and any external systems that provide data to the application. Perform input validation at well-defined interfaces. Directly convert your input type into the expected data type, such as using a conversion function that translates a string into a number. After converting to the expected data type, ensure that the input's values fall within the expected range of allowable values and that multi-field consistencies are maintained.

Which programming languages are affected by Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')?+

CWE-88 commonly affects PHP and Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')?+

MITRE documents real CVEs mapped to CWE-88, including CVE-2022-36069, CVE-1999-0113, CVE-2001-0150, CVE-2001-0667 and CVE-2002-0985. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-88 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More

Advertisement