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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-28346 PoC — Django SQL注入漏洞

Source
Associated Vulnerability
Title:Django SQL注入漏洞 (CVE-2022-28346)
Description:Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 2.2.28 版本之前的 2.2 版本、3.2.13 版本之前的 3.2 版本、4.0.4 版本之前的 4.0 版本存在SQL注入漏洞,QuerySet.annotate()、aggregate() 和 extra() 中存在 SQL 注入问题。
Description
SQL injection in QuerySet.annotate(), aggregate(), and extra()
Readme
# CVE-2022-28346
SQL injection in QuerySet.annotate(), aggregate(), and extra()

# 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 cve202228346
python manage.py migrate
```

Start the instances using: 
`docker-compose up`

Now open the following URL to load sample data:

http://localhost:8000/load_example_data

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

Exploit the parameter at:
**todo**
File Snapshot

[4.0K] /data/pocs/9e15e82ad91968ac9f2ce5ff7f9368221381a4fb ├── [4.0K] cve202228346 │   ├── [ 150] apps.py │   ├── [ 149] models.py │   ├── [3.3K] settings.py │   ├── [ 190] urls.py │   └── [ 852] views.py ├── [ 378] docker-compose.yml ├── [ 159] Dockerfile ├── [ 567] README.md ├── [ 35] requirements.txt └── [ 185] setup.sh 1 directory, 10 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.