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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-7471 PoC — Django SQL注入漏洞

Source
Associated Vulnerability
Title:Django SQL注入漏洞 (CVE-2020-7471)
Description:Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 1.11.28之前的1.11版本、2.2.10之前的2.2版本和3.0.3之前的3.0版本中存在SQL注入漏洞。远程攻击者可借助特制StringAgg分隔符利用该漏洞造成拒绝服务,获取信息或提升权限。
Description
Reproduce CVE-2020-7471
Readme
# CVE-2020-7471
SQL injection via StringAgg delimeter input

# Setup:
Run `./setup.sh` for initial setup

Open the docker image to initiate the database:
`docker exec -it {container_id} /bin/bash`
And run the following commands:
```
python manage.py makemigrations vul_app
python manage.py migrate
```

Start the instances using: 
`docker-compose up`

Now open the following URL to load sample data:

http://localhost:8000/vul_app/setupdb

Then go to the vulnerable page at:
http://localhost:8000/vul_app/

Exploit the parameter at:
http://localhost:8000/vul_app/?delim=!@#
File Snapshot

[4.0K] /data/pocs/8e72261b874f284d48257fbcb53a3e4e90b2c658 ├── [4.0K] cve20207471 │   ├── [ 415] asgi.py │   ├── [3.6K] settings.py │   ├── [ 860] urls.py │   └── [ 415] wsgi.py ├── [ 387] docker-compose.yml ├── [ 159] Dockerfile ├── [ 574] README.md ├── [ 37] requirements.txt ├── [ 181] setup.sh └── [4.0K] vul_app ├── [ 66] admin.py ├── [ 151] apps.py ├── [ 259] models.py ├── [4.0K] templates │   └── [ 829] index.html ├── [ 63] tests.py ├── [ 179] urls.py └── [1.0K] views.py 3 directories, 16 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.