CWE-627 动态变量执行

admin 2021年12月16日16:26:56评论62 views字数 2072阅读6分54秒阅读模式

CWE-627 动态变量执行

Dynamic Variable Evaluation

结构: Simple

Abstraction: Base

状态: Incomplete

被利用可能性: unkown

基本描述

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.

扩展描述

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.

相关缺陷

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

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

  • cwe_Nature: PeerOf cwe_CWE_ID: 183 cwe_View_ID: 1000

适用平台

Language: [{'cwe_Name': 'PHP', 'cwe_Prevalence': 'Undetermined'}, {'cwe_Name': 'Perl', 'cwe_Prevalence': 'Undetermined'}]

常见的影响

范围 影响 注释
['Confidentiality', 'Integrity', 'Availability'] ['Modify Application Data', 'Execute Unauthorized Code or Commands'] An attacker could gain unauthorized access to internal program variables and execute arbitrary code.

可能的缓解方案

Implementation

策略: Refactoring

Refactor the code to avoid dynamic variable evaluation whenever possible.

Implementation

策略: Input Validation

Use only whitelists of acceptable variable or function names.

Implementation

策略:

For function names, ensure that you are only calling functions that accept the proper number of arguments, to avoid unexpected null arguments.

分析过的案例

标识 说明 链接
CVE-2009-0422 Chain: Dynamic variable evaluation allows resultant remote file inclusion and path traversal. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0422
CVE-2007-2431 Chain: dynamic variable evaluation in PHP program used to modify critical, unexpected $_SERVER variable for resultant XSS. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2431
CVE-2006-4904 Chain: dynamic variable evaluation in PHP program used to conduct remote file inclusion. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4904
CVE-2006-4019 Dynamic variable evaluation in mail program allows reading and modifying attachments and preferences of other users. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4019

Notes

引用

文章来源于互联网:scap中文网

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年12月16日16:26:56
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-627 动态变量执行http://cn-sec.com/archives/613072.html

发表评论

匿名网友 填写信息