本来想给论坛加个上传附件的功能,从官方网站下了个pun_attachment,顺便看了下代码,结果发现了这个漏洞:p
if (isset($_GET['secure_str']))
{
if (preg_match('~(\d+)f(\d+)~', $_GET['secure_str'], $match))
{
...
'WHERE' => 'a.id = '.$attach_item.' AND (fp.read_forum IS NULL OR fp.read_forum = 1) AND secure_str = \''.$_GET['secure_str'].'\''
挺明显的,应该是对正则表达式及preg_match函数的误用,导致可以通过$_GET['secure_str']来触发sql inj...
另外,在pun_list_attach.php文件还有个注射,不过需要后台权限,有兴趣的同学自己看,那个要更明显些:)
PunBB 1.2.22
厂商补丁:
PunBB
-----
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.punbb.org/
暂无评论