CWE-454: External Initialization of Trusted Variables or Data Stores
CWE版本: 4.18
更新日期: 2025-09-09
弱点描述
The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.
扩展描述
A product system should be reluctant to trust variables that have been initialized outside of its trust boundary, especially if they are initialized by users. The variables may have been initialized incorrectly. If an attacker can initialize the variable, then they can influence what the vulnerable system will do.
常见后果
影响范围: Integrity
技术影响: Modify Application Data
说明: An attacker could gain access to and modify sensitive data or system information.
潜在缓解措施
阶段: Implementation
策略: Input Validation
描述: A product system should be reluctant to trust variables that have been initialized outside of its trust boundary. Ensure adequate checking (e.g. input validation) is performed when relying on input from outside a trust boundary.
阶段: Architecture and Design
描述: Avoid any external control of variables. If necessary, restrict the variables that can be modified using an allowlist, and use a different namespace or naming convention if possible.
观察示例
参考: CVE-2022-43468
WordPress module sets internal variables based on external inputs, allowing false reporting of the number of views
参考: CVE-2000-0959
Does not clear dangerous environment variables, enabling symlink attack.
参考: CVE-2001-0033
Specify alternate configuration directory in environment variable, enabling untrusted path.
参考: CVE-2001-0872
Dangerous environment variable not cleansed.
参考: CVE-2001-0084
Specify arbitrary modules using environment variable.
引入模式
| 阶段 | 说明 |
|---|---|
| Architecture and Design | - |
| Implementation | - |
适用平台
编程语言
分类映射
| 分类名称 | 条目ID | 条目名称 | 映射适配度 |
|---|---|---|---|
| PLOVER | - | External initialization of trusted variables or values | - |
| Software Fault Patterns | SFP25 | Tainted input to variable | - |