9.8critical
SQL Injection in Django
- Severity
- 9.8critical CVSS:3.0 by NVD
- Exploit likelihood
- 47.7% (higher than 99% of CVEs)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-6r97-cj55-9hrqPYSEC-2019-13
Description
An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x before 2.2.4. Due to an error in shallow key transformation, key and index lookups for django.contrib.postgres.fields.JSONField, and key lookups for django.contrib.postgres.fields.HStoreField, were subject to SQL injection. This could, for example, be exploited via crafted use of "OR 1=1" in a key or index name to return all records, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to the QuerySet.filter() function.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| django (PyPI) | from 1.11a1 before 1.11.23, from 2.1a1 before 2.1.11, from 2.2a1 before 2.2.4, from 2.1 before 2.1.11, from 1.11 before 1.11.23, from 2.2 before 2.2.4 | GitHub Advisory Database, PyPA Advisory Database |
| djangoproject django | from 1.11 before 1.11.23, from 2.1 before 2.1.11, from 2.2 before 2.2.4 | NVD |
| fedoraproject fedora | 30 | NVD |
| debian debian_linux | 9.0, 10.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| NVD | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x before 2.2.4. Due to an error in shallow key transformation, key and index lookups for django.contrib.postgres.fields.JSONField, and key lookups for django.contrib.postgres.fields.HStoreField, were subject to SQL injection. This could, for example, be exploited via crafted use of "OR 1=1" in a key or index name to return all records, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to the QuerySet.filter() function.
NVD (es)
Se detectó un problema en Django versiones 1.11.x anteriores a 1.11.23, versiones 2.1.x anteriores a 2.1.11 y versiones 2.2.x anteriores a 2.2.4. Debido a un error en la transformación de clave superficial, las búsquedas de clave e índice para django.contrib.postgres.fields.JSONField, y las búsquedas de clave para django.contrib.postgres.fields.HStoreField, estaban sujetas a una inyección SQL. Esto podría, por ejemplo, ser explotado mediante el uso de un "OR 1 = 1" diseñado en una clave o nombre de índice para devolver todos los registros, utilizando un diccionario cuidadosamente diseñado, con expansión de diccionario, como los **kwargs pasados a la función QuerySet.filter().
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2019-14234 changed 2024-08-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6r97-cj55-9hrq changed 2025-02-21 | CC-BY-4.0 |
| NVD | CVE-2019-14234 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2019-13 changed 2023-11-08 | CC-BY-4.0 |