CWE-621:可变提取错误
查看自定义信息:
For example, in PHP, extraction can be used to provide functionality similar to register_globals, a dangerous functionality that is frequently disabled in production systems. Calling extract() or import_request_variables() without the proper arguments could allow arbitrary global variables to be overwritten, including superglobals. Similar functionality is possible in other interpreted languages, including custom languages. ![]() ![]()
![]() ![]()
![]()
![]() Languages php(Undetermined Prevalence) ![]()
示例1 This code uses the credentials sent in a POST request to login a user.
(bad code)
示例语言:php
//Log user in, and set $isAdmin to true if user is an administrator
功能登录($ user,$ pass){
$query = buildQuery($user,$pass); }mysql_query($ query); if(getuserrole($ user)==“ admin”){
$isAdmin = true; }$isAdmin = false; extract($_POST); login(mysql_real_escape_string($user),mysql_real_escape_string($pass)); 呼叫提取()将覆盖上面定义的任何变量的现有值,在这种情况下为$ isadmin。攻击者可以发送带有意外的第三值“ Isadmin”等于“ True”的邮政请求,从而获得管理特权。
![]()
Research Gap
Probably under-reported for PHP. Seems under-studied for other interpreted languages.
提供更多信息 - 请选择其他过滤器。
|
使用共同弱点枚举(CWE)和本网站的相关参考Terms of Use。CWE由美国国土安全部(DHS)Cybersecurity and Infrastructure Security Agency(CISA) and managed by theHomeland Security Systems Engineering and Development Institute(HSSEDI)由manbetx客户端首页(MITER)。版权所有©2006–2023,Miter Comanbetx客户端首页rporation。CWE,CWSS,CWRAF和CWE徽标是Miter Corporation的商标。manbetx客户端首页 |