CVE-2019-14234: SQL Injection in Django
9.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.95104%
CWE
Published
8/16/2019
Updated
9/20/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
Django | pip | >= 1.11a1, < 1.11.23 | 1.11.23 |
Django | pip | >= 2.1a1, < 2.1.11 | 2.1.11 |
Django | pip | >= 2.2a1, < 2.2.4 | 2.2.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper SQL query construction in the KeyTransform classes for HStoreField and JSONField. The original implementations in hstore.py and jsonb.py used unsafe string interpolation (via %-formatting) for key/index names when generating SQL fragments. This allowed attackers to inject malicious SQL via specially crafted key names in filter() kwargs. The patches replaced direct string interpolation with parameterized queries ([self.key_name] + params), confirming these functions were the injection vectors. The added test cases demonstrating 'OR 1=1' exploitation via key names further validate these as the vulnerable points.