CWE-627 詳細資料

CWE-627

Dynamic Variable Evaluation
2007-05-07
00h00 +00:00
Incomplete
2026-10-28
00h00 +00:00
指定 CWE 通知
掌握特定 CWE 的任何變更。
管理通知

名稱: Dynamic Variable Evaluation

In a language where the user can influence the name of a variable at runtime, if the variable names are not controlled, an attacker can read or write to arbitrary variables, or access arbitrary functions.

一般資訊

背景詳情

引入方式

Implementation

適用平台

程式語言

名稱: PHP (Undetermined)
名稱: Perl (Undetermined)

常見後果

範圍 影響 可能性
Confidentiality
Integrity
Availability
Modify Application Data, Execute Unauthorized Code or Commands, Varies by Context

注意:An attacker could gain unauthorized read or write access to internal program variables and possibly execute arbitrary code. The resultant vulnerabilities depend on the behavior of the application, both at the crossover point and in any control/data flow that is reachable by the related variables or functions.

觀察到的案例

參考資料 描述

CVE-2009-0422

Chain: Dynamic variable evaluation allows resultant remote file inclusion and path traversal.

CVE-2007-2431

Chain: dynamic variable evaluation in PHP program used to modify critical, unexpected $_SERVER variable for resultant XSS.

CVE-2006-4904

Chain: dynamic variable evaluation in PHP program used to conduct remote file inclusion.

CVE-2006-4019

Dynamic variable evaluation in mail program allows reading and modifying attachments and preferences of other users.

潛在緩解措施

Phases : Implementation
Refactor the code to avoid dynamic variable evaluation whenever possible.
Phases : Implementation
Use only allowlists of acceptable variable or function names.
Phases : Implementation
For function names, ensure that you are only calling functions that accept the proper number of arguments, to avoid unexpected null arguments.

漏洞對應備注

理由說明 : This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
備註 : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

備注

Under-studied, probably under-reported. Few researchers look for this issue; most public reports are for PHP, although other languages are affected. This issue is likely to grow in PHP as developers begin to implement functionality in place of register_globals.

參考資料

REF-517

Dynamic Evaluation Vulnerabilities in PHP applications
Steve Christey.
https://seclists.org/fulldisclosure/2006/May/35

REF-518

A Study In Scarlet: Exploiting Common Vulnerabilities in PHP Applications
Shaun Clowes.
https://securereality.com.au/study-in-scarlett/

提交

名稱 機構 日期 發布日期 Version
CWE Content Team MITRE 2007-05-07 +00:00 2007-05-07 +00:00 Draft 6

修改記錄

名稱 機構 日期 備註
Eric Dalci Cigital 2008-07-01 +00:00 updated Time_of_Introduction
CWE Content Team MITRE 2008-09-08 +00:00 updated Applicable_Platforms, Relationships
CWE Content Team MITRE 2008-10-14 +00:00 updated Background_Details, Description
CWE Content Team MITRE 2011-03-29 +00:00 updated Description
CWE Content Team MITRE 2011-06-01 +00:00 updated Common_Consequences
CWE Content Team MITRE 2012-05-11 +00:00 updated Common_Consequences, Relationships
CWE Content Team MITRE 2012-10-30 +00:00 updated Potential_Mitigations
CWE Content Team MITRE 2013-02-21 +00:00 updated Common_Consequences, Observed_Examples, Potential_Mitigations, Relationships, Weakness_Ordinalities
CWE Content Team MITRE 2014-07-30 +00:00 updated Relationships
CWE Content Team MITRE 2017-11-08 +00:00 updated References
CWE Content Team MITRE 2020-02-24 +00:00 updated Relationships
CWE Content Team MITRE 2020-06-25 +00:00 updated Potential_Mitigations
CWE Content Team MITRE 2023-04-27 +00:00 updated References, Relationships, Type
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes
CWE Content Team MITRE 2026-10-28 +00:00 updated Common_Consequences, Description