CWE-829: Inclusion of Functionality from Untrusted Control Sphere
CWE版本: 4.18
更新日期: 2025-09-09
弱点描述
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
常见后果
影响范围: Confidentiality Integrity Availability
技术影响: Execute Unauthorized Code or Commands
说明: An attacker could insert malicious functionality into the program by causing the program to download code that the attacker has placed into the untrusted control sphere, such as a malicious web site.
潜在缓解措施
阶段: Architecture and Design
策略: Libraries or Frameworks
描述: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
阶段: Architecture and Design
策略: Enforcement by Conversion
阶段: Architecture and Design
描述: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
阶段: Architecture and Design Operation
策略: Sandbox or Jail
有效性: Limited
阶段: Architecture and Design Operation
策略: Environment Hardening
描述: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
阶段: Implementation
策略: Input Validation
有效性: High
阶段: Architecture and Design Operation
策略: Attack Surface Reduction
阶段: Architecture and Design Implementation
策略: Attack Surface Reduction
阶段: Operation
策略: Firewall
描述: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
有效性: Moderate
检测方法
方法: Automated Static Analysis - Binary or Bytecode
有效性: SOAR Partial
方法: Manual Static Analysis - Binary or Bytecode
有效性: SOAR Partial
方法: Dynamic Analysis with Manual Results Interpretation
有效性: SOAR Partial
方法: Manual Static Analysis - Source Code
有效性: High
方法: Automated Static Analysis - Source Code
有效性: SOAR Partial
方法: Architecture or Design Review
有效性: High
观察示例
参考: CVE-2010-2076
Product does not properly reject DTDs in SOAP messages, which allows remote attackers to read arbitrary files, send HTTP requests to intranet servers, or cause a denial of service.
参考: CVE-2004-0285
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2004-0030
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2004-0068
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2005-2157
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2005-2162
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2005-2198
Modification of assumed-immutable configuration variable in include file allows file inclusion via direct request.
参考: CVE-2004-0128
Modification of assumed-immutable variable in configuration script leads to file inclusion.
参考: CVE-2005-1864
PHP file inclusion.
参考: CVE-2005-1869
PHP file inclusion.
参考: CVE-2005-1870
PHP file inclusion.
参考: CVE-2005-2154
PHP local file inclusion.
参考: CVE-2002-1704
PHP remote file include.
参考: CVE-2002-1707
PHP remote file include.
参考: CVE-2005-1964
PHP remote file include.
参考: CVE-2005-1681
PHP remote file include.
参考: CVE-2005-2086
PHP remote file include.
参考: CVE-2004-0127
Directory traversal vulnerability in PHP include statement.
参考: CVE-2005-1971
Directory traversal vulnerability in PHP include statement.
参考: CVE-2005-3335
PHP file inclusion issue, both remote and local; local include uses ".." and "%00" characters as a manipulation, but many remote file inclusion issues probably have this vector.
引入模式
| 阶段 | 说明 |
|---|---|
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
关键信息
CWE ID: CWE-829
抽象级别: Base
结构: Simple
状态: Incomplete