Skip to content


ThinkPhp web框架 php代码任意执行漏洞

漏洞版本: ThinkPHP 漏洞描述: ThinkPHP是一款国内使用比较广泛的老牌PHP MVC框架,有不少创业公司或者项目都用了这个框架

ThinkPHP不正确过滤用户提交的参数,远程攻击者可以利用漏洞以应用程序上下文执行任意PHP代码

测试方法:

本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负! index.php/module/action/param1/${@print(THINK_VERSION)} 安全建议: 用户可下载官方发布的补丁: http://code.google.com/p/thinkphp/source/detail?spec=svn2904&r=2838 或者或者直接修改源码: /trunk/ThinkPHP/Lib/Core/Dispatcher.class.php $res = preg_replace(‘@(w+)’.$depr.'([^’.$depr.’\/]+)@e’, ‘$var[\’\1\’]=”\2″;’, implode($depr,$paths)); 修改为 $res = preg_replace(‘@(w+)’.$depr.'([^’.$depr.’\/]+)@e’, ‘$var[\’\1\’]=”\2′;’, implode($depr,$paths)); 将preg_replace第二个参数中的双引号改为单引号,防止其中的php变量语法被解析执行。

来自sebug.net

Posted in 安全通告, 技术.

Tagged with , .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.