CVE-2019-14234
JSON

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 packageVersionsReported by
Unspecified productn/aCVE 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.4GitHub Advisory Database, PyPA Advisory Database
djangoproject djangofrom 1.11 before 1.11.23, from 2.1 before 2.1.11, from 2.2 before 2.2.4NVD
fedoraproject fedora30NVD
debian debian_linux9.0, 10.0NVD

All scores

GitHub9.8critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV: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

https://docs.djangoproject.com/en/dev/releases/security/vendor-advisory, web
https://groups.google.com/forum/#%21topic/django-announce/jIoju2-KLDs
https://www.djangoproject.com/weblog/2019/aug/01/security-releases/article, vendor-advisory
https://seclists.org/bugtraq/2019/Aug/15mailing-list, third-party-advisory, web
https://www.debian.org/security/2019/dsa-4498advisory, third-party-advisory, vendor-advisory, web
http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00025.htmlmailing-list, third-party-advisory, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/STVX7X7IDWAH5SKE6MBMY3TEI6ZODBTK/vendor-advisory
https://security.netapp.com/advisory/ntap-20190828-0002/advisory
https://security.gentoo.org/glsa/202004-17advisory, vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2019-14234advisory
https://github.com/django/django/commit/4f5b58f5cd3c57fee9972ab074f8dc6895d8f387web
https://github.com/django/django/commit/ed682a24fca774818542757651bfba576c3fc3efweb

Sources

SourceRecordLicence
CVE ListCVE-2019-14234 changed 2024-08-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-6r97-cj55-9hrq changed 2025-02-21CC-BY-4.0
NVDCVE-2019-14234 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2019-13 changed 2023-11-08CC-BY-4.0