Failure to Sanitize Data into a Different Plane ('Injection') |
Weakness ID: 74 (Weakness Class) | Status: Incomplete |
Description Summary
Extended Description
Software has certain assumptions about what constitutes data and control respectively. It is the lack of verification of these assumptions for user-controlled input that leads to injection problems. Injection problems encompass a wide variety of issues -- all mitigated in very different ways and usually attempted in order to alter the control flow of the process. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.
Scope | Effect |
---|---|
Confidentiality | Many injection attacks involve the disclosure of important information -- in terms of both data sensitivity and usefulness in further exploitation |
Authentication | In some cases injectable code controls authentication; this may lead to remote vulnerability |
Access Control | Injection attacks are characterized by the ability to significantly change the flow of a given process, and in some cases, to the execution of arbitrary code. |
Integrity | Data injection attacks lead to loss of data integrity in nearly all cases as the control-plane data injected is always incidental to data recall or writing. |
Accountability | Often the actions performed by injected control code are unlogged. |
Requirements specification: Programming languages and supporting technologies might be chosen which are not subject to these issues. |
Phase: Implementation Utilize an appropriate mix of white-list and black-list parsing to filter control-plane syntax from all input. |
Ordinality | Description |
---|---|
Primary | (where the weakness exists independent of other weaknesses) |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 20 | Improper Input Validation | Development Concepts (primary)699 |
ChildOf | ![]() | 707 | Improper Enforcement of Message or Data Structure | Research Concepts (primary)1000 |
ChildOf | ![]() | 727 | OWASP Top Ten 2004 Category A6 - Injection Flaws | Weaknesses in OWASP Top Ten (2004) (primary)711 |
ParentOf | ![]() | 75 | Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 77 | Improper Sanitization of Special Elements used in a Command ('Command Injection') | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 79 | Failure to Preserve Web Page Structure ('Cross-site Scripting') | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 91 | XML Injection (aka Blind XPath Injection) | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 93 | Failure to Sanitize CRLF Sequences ('CRLF Injection') | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 94 | Failure to Control Generation of Code ('Code Injection') | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 99 | Improper Control of Resource Identifiers ('Resource Injection') | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 134 | Uncontrolled Format String | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 138 | Improper Sanitization of Special Elements | Development Concepts (primary)699 |
CanFollow | ![]() | 20 | Improper Input Validation | Research Concepts1000 |
CanFollow | ![]() | 116 | Improper Encoding or Escaping of Output | Research Concepts1000 |
In the development view (CWE-699), this is classified as an Input Validation problem (CWE-20) because many people do not distinguish between the consequence/attack (injection) and the protection mechanism that prevents the attack from succeeding. In the research view (CWE-1000), however, input validation is only one potential protection mechanism (output encoding is another), and there is a chaining relationship between improper input validation and the failure to enforce the structure of messsages to other components. Other issues not directly related to input validation, such as race conditions, could similarly impact message structure. |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
CLASP | Injection problem ('data' used as something else) | ||
OWASP Top Ten 2004 | A6 | CWE More Specific | Injection Flaws |
CAPEC-ID | Attack Pattern Name | (CAPEC Version: 1.4) |
---|---|---|
3 | Using Leading 'Ghost' Character Sequences to Bypass Input Filters | |
7 | Blind SQL Injection | |
8 | Buffer Overflow in an API Call | |
9 | Buffer Overflow in Local Command-Line Utilities | |
10 | Buffer Overflow via Environment Variables | |
13 | Subverting Environment Variable Values | |
14 | Client-side Injection-induced Buffer Overflow | |
24 | Filter Failure through Buffer Overflow | |
28 | Fuzzing | |
40 | Manipulating Writeable Terminal Devices | |
42 | MIME Conversion | |
43 | Exploiting Multiple Input Interpretation Layers | |
45 | Buffer Overflow via Symbolic Links | |
46 | Overflow Variables and Tags | |
47 | Buffer Overflow via Parameter Expansion | |
51 | Poison Web Service Registry | |
52 | Embedding NULL Bytes | |
53 | Postfix, Null Terminate, and Backslash | |
101 | Server Side Include (SSI) Injection | |
64 | Using Slashes and URL Encoding Combined to Bypass Validation Logic | |
66 | SQL Injection | |
67 | String Format Overflow in syslog() | |
72 | URL Encoding | |
78 | Using Escaped Slashes in Alternate Encoding | |
79 | Using Slashes in Alternate Encoding | |
83 | XPath Injection | |
34 | HTTP Response Splitting | |
76 | Manipulating Input to File System Calls | |
71 | Using Unicode Encoding to Bypass Validation Logic | |
80 | Using UTF-8 Encoding to Bypass Validation Logic | |
84 | XQuery Injection | |
91 | XSS in IMG Tags | |
106 | Cross Site Scripting through Log Files | |
108 | Command Line Execution through SQL Injection |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
CLASP | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-08-15 | Veracode | External | ||
Suggested OWASP Top Ten 2004 mapping | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Common Consequences, Description, Relationships, Other Notes, Relationship Notes, Taxonomy Mappings, Weakness Ordinalities | ||||
2009-01-12 | CWE Content Team | MITRE | Internal | |
updated Relationships | ||||
2009-05-27 | CWE Content Team | MITRE | Internal | |
updated Name, Related Attack Patterns | ||||
2009-07-27 | CWE Content Team | MITRE | Internal | |
updated Relationships | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Description, Other Notes | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | Injection | |||
2009-05-27 | Failure to Sanitize Data into a Different Plane (aka 'Injection') | |||