CWE-74 输出中的特殊元素转义处理不恰当(注入)

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

结构: Simple

Abstraction: Class

状态: Incomplete

被利用可能性: High

基本描述

The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

扩展描述

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.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 707 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 116 cwe_View_ID: 699 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 20 cwe_View_ID: 699

适用平台

Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Confidentiality Read Application Data Many injection attacks involve the disclosure of important information -- in terms of both data sensitivity and usefulness in further exploitation.
Access Control Bypass Protection Mechanism In some cases, injectable code controls authentication; this may lead to a remote vulnerability.
Other Alter Execution Logic 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', 'Other'] Other 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.
Non-Repudiation Hide Activities Often the actions performed by injected control code are unlogged.

可能的缓解方案

Requirements

策略:

Programming languages and supporting technologies might be chosen which are not subject to these issues.

Implementation

策略:

Utilize an appropriate mix of whitelist and blacklist parsing to filter control-plane syntax from all input.

Notes

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
CLASP Injection problem ('data' used as something else)
OWASP Top Ten 2004 A6 CWE More Specific Injection Flaws
Software Fault Patterns SFP24 Tainted input to command

相关攻击模式

  • CAPEC-10
  • CAPEC-101
  • CAPEC-108
  • CAPEC-120
  • CAPEC-13
  • CAPEC-135
  • CAPEC-14
  • CAPEC-24
  • CAPEC-250
  • CAPEC-267
  • CAPEC-273
  • CAPEC-28
  • CAPEC-3
  • CAPEC-34
  • CAPEC-42
  • CAPEC-43
  • CAPEC-45
  • CAPEC-46
  • CAPEC-47
  • CAPEC-51
  • CAPEC-52
  • CAPEC-53
  • CAPEC-6
  • CAPEC-64
  • CAPEC-66
  • CAPEC-67
  • CAPEC-7
  • CAPEC-71
  • CAPEC-72
  • CAPEC-76
  • CAPEC-78
  • CAPEC-79
  • CAPEC-8
  • CAPEC-80
  • CAPEC-83
  • CAPEC-84
  • CAPEC-9