目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2019-14234 PoC — Django SQL注入漏洞

来源
关联漏洞
标题: Django SQL注入漏洞 (CVE-2019-14234)
Description:Django是Django基金会的一套基于Python语言的开源Web应用框架。该框架包括面向对象的映射器、视图系统、模板系统等。 Django 2.2.4之前的2.2版本、2.1.11之前的2.1版本和1.11.23之前的1.11版本中存在SQL注入漏洞。该漏洞源于基于数据库的应用缺少对外部输入SQL语句的验证。攻击者可利用该漏洞执行非法SQL命令。
Description
POC-Django JSONField/HStoreField SQL Injection Vulnerability (CVE-2019-14234)
介绍
# POC-Django JSONField/HStoreField SQL Injection Vulnerability Exploit (CVE-2019-14234)
Django released a security update on August 1, 2019, which fixes a SQL injection vulnerability in the two model fields of JSONField and HStoreField.

Reference link: 

https://www.djangoproject.com/weblog/2019/aug/01/security-releases/
https://www.leavesongs.com/PENETRATION/django-jsonfield-cve-2019-14234.html

The vulnerability requires the developer to use JSONField/HStoreField; moreover, the field name of the queryset can be controlled. Django's built-in application Django-Admin is affected, which gives us an easy way to reproduce the vulnerability.

## Start Vulnerability Application
Compile and start a vulnerable Django 2.2.3 by executing the following command:


```
docker compose build
docker compose up -d
```

After the environment is started, you can see the home page of Django at http://your-ip:8000.

## Vulnerability Reproduce
First, log in to the Django-Admin `http://your-ip:8000/admin/` with username `admin` and password `a123123123`.

Then go to the list-view `http://your-ip:8000/admin/vuln/collection/` of the model `Collection`:

Add `detail__a'b=123` to the GET parameter, where `detail` is the JSONField:

http://your-ip:8000/admin/vuln/collection/?detail__a%27b=123

You can see that the single quote has been injected successfully, and the SQL statement reports an error:

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →