PT-2022-3421

CVE-2022-34265

·

Published

2022-04-07

·

Updated

2026-10-31

Description by

CVSS 3.1
9.8
Critical
MetricsAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Django versions 3.2.0 through 3.2.13 Django versions 4.0.0 through 4.0.5
Description The issue is related to SQL injection in the Trunc() and Extract() database functions when untrusted data is used as a kind/lookup name value. This can allow an attacker to access or delete database data. Applications that constrain the lookup name and kind choice to a known safe list are unaffected. The vulnerability exists in the main branch and versions 4.1, 4.0, and 3.2 of Django. It is estimated that tens of thousands of website owners are affected.
Recommendations For Django versions 3.2.0 through 3.2.13, update to version 3.2.14 or later. For Django versions 4.0.0 through 4.0.5, update to version 4.0.6 or later. As a temporary workaround, consider validating and sanitizing input data for the kind and lookup name parameters before passing them to the Trunc() and Extract() functions. Restrict access to the Trunc() and Extract() functions to minimize the risk of exploitation.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-P64X-8RXX-WF6Q
ALSA-2025_16880
ALT-PU-2022-2476
ALT-PU-2022-2521
BIT-DJANGO-2022-34265
CLEANSTART-2024-BV07404
DLA-3164-1
DSA-5254-1
MGASA-2022-0281
OPENSUSE-SU-2024:12172-1
OPENSUSE-SU-2024:14208-1
OPENSUSE-SU-2025:14662-1
OPENSUSE-SU-2026:10005-1
OPENSUSE-SU-2026:11235-1
OPENSUSE-SU-2026:11270-1
PYSEC-2022-213
RHSA-2022:5738
RHSA-2022:8506
RLSA-2022:8506
RLSA-2022_8506
SUSE-SU-2022:3338-1
SUSE-SU-2022:3339-1
USN-5501-1
Found an issue in the description? Have something to add? Feel free to write us 👾