{"schema_version":"1.9.0","id":"CVE-2022-34265","published":"2022-07-04T00:00:00Z","modified":"2026-08-12T03:51:35.410710965Z","aliases":["BIT-django-2022-34265","GHSA-p64x-8rxx-wf6q","PYSEC-2022-213"],"related":["SUSE-SU-2022:3338-1","SUSE-SU-2022:3339-1","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"],"details":"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.","affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/django/django","events":[{"introduced":"3591e1c1acbd7c13174275367c3fdf012cb0413b"},{"fixed":"746e88cc634469112b823225c19d75c7362f8ecf"},{"introduced":"ef62a3a68c9d558486145a42c0d71ea9a76add9e"},{"fixed":"caad462feaa84ba78ed658a9595a4a4363dad2db"}],"database_specific":{"cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"3.2"},{"fixed":"3.2.14"},{"introduced":"4.0"},{"fixed":"4.0.6"}],"source":"CPE_RANGE"}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-34265.json"}}],"references":[{"type":"WEB","url":"https://docs.djangoproject.com/en/4.0/releases/security/"},{"type":"WEB","url":"https://groups.google.com/forum/#%21forum/django-announce"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/34xxx/CVE-2022-34265.json"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-34265"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220818-0006/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5254"},{"type":"ARTICLE","url":"https://www.djangoproject.com/weblog/2022/jul/04/security-releases/"}],"database_specific":{"cna_assigner":"mitre","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/34xxx/CVE-2022-34265.json","unresolved_ranges":[{"extracted_events":[{"introduced":"3.2"},{"fixed":"3.2.14"},{"introduced":"4.0"},{"fixed":"4.0.6"}],"source":"DESCRIPTION"}]}}