CVE-2022-34265
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.
What to do
Likely to be exploited: EPSS gives a 21% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, PyPI, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | python-django | Fixed | 2:3.2.12-2ubuntu1.1 | UBUNTU-CVE-2022-34265 |
| Ubuntu 20.04 | python-django | Fixed | 2:2.2.12-1ubuntu0.12 | UBUNTU-CVE-2022-34265 |
| Ubuntu 18.04 | python-django | Fixed | 1:1.11.11-1ubuntu1.18 | UBUNTU-CVE-2022-34265 |
| Debian 14 | python-django | Fixed | 2:4.0.6-1 | DEBIAN-CVE-2022-34265 |
| Debian 13 | python-django | Fixed | 2:4.0.6-1 | DEBIAN-CVE-2022-34265 |
| Debian 12 | python-django | Fixed | 2:4.0.6-1 | DEBIAN-CVE-2022-34265 |
| Rocky Linux 8 | libdb | Fixed | 0:5.3.28-42.el8_4 | RLSA-2022:8506 |
| Alpine Linux 3.24 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.23 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.22 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.21 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.20 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.19 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.18 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.17 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| Alpine Linux 3.16 | py3-django | Fixed | 3.2.14-r0 | ALPINE-CVE-2022-34265 |
| PyPI library | django | Fixed | 3.2.14 | GHSA-p64x-8rxx-wf6q |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://www.debian.org/security/2022/dsa-5254 (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://groups.google.com/forum/#%21forum/django-announce
- https://docs.djangoproject.com/en/4.0/releases/security/
- https://www.djangoproject.com/weblog/2022/jul/04/security-releases/
- https://security.netapp.com/advisory/ntap-20220818-0006/
- https://www.debian.org/security/2022/dsa-5254
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.