An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HDjangoproject Django
APPDjangoproject3.2 β 3.2.14 (bez)4.0 β 4.0.6 (bez)
π’
PATCH AVAILABLE
Vendor update available. Deploy in standard maintenance cycle.
Tags
SQLi
CWE
References
Related vulnerabilities
CVE-2026-4277CRITICAL9.8PL βten sam produkt
Django: brak walidacji uprawnieΕ dodawania w GenericInlineModelAdmin
CVE-2025-64459CRITICAL9.1PL βten sam produkt
SQL injection w Django via argument _connector w QuerySet i Q()
CVE-2024-53908CRITICAL9.8PL βten sam produkt
SQL Injection w Django przez HasKey lookup na bazie Oracle
CVE-2023-31047CRITICAL9.8ten sam produkt
In Django 3.2 before 3.2.19, 4.x before 4.1.9, and 4.2 before 4.2.1, it was possible to bypass validation when...
CVE-2022-28346CRITICAL9.8ten sam produkt
An issue was discovered in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. QuerySet.annotat...