Feed
9.8CRITICAL
CVE-2022-34265Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection
A critical-severity vulnerability reachable over the network, needing no privileges and no user interaction. EPSS estimates a 21.3% chance of exploitation in the next 30 days. A fixed version is named.
- Exploited in the wild
- Not in KEV
- EPSS
- 21.3%
- percentile 98%
- Fix
- Named by a source
- CVE published 4 Jul 2022
Reference
None of the "Needs attention" rules apply right now.
EPSS 21.3% (+21) · Network attack vector (+10) · No privileges required (+5) · No user interaction (+5)
Immediate actions
- django (PyPI): upgrade to 3.2.14 / 4.0.6 or later on your release line.
- Commit / pull request: https://github.com/django/django/commit/0dc9c016fadb71a067e5a42be30164e3f96c0492
- Commit / pull request: https://github.com/django/django/commit/5e2f4ddf2940704a26a4ac782b851989668d74db
- Commit / pull request: https://github.com/django/django/commit/877c800f255ccaa7abde1fb944de45d1616f5cc9
- Commit / pull request: https://github.com/django/django/commit/a9010fe5555e6086a9d9ae50069579400ef0685e
Who should check
django (PyPI) pkg:pypi/django
- Affected>= 3.2a1, < 3.2.14Fixed in3.2.14OSV (GHSA-p64x-8rxx-wf6q)
- Affected>= 4.0a1, < 4.0.6Fixed in4.0.6OSV (GHSA-p64x-8rxx-wf6q)
- Affected>= 3.2, < 3.2.14Fixed in3.2.14OSV (PYSEC-2022-213)
- Affected>= 4.0, < 4.0.6Fixed in4.0.6OSV (PYSEC-2022-213)
Confirmed facts
- CVSS
- 9.8 CRITICAL (version 3.1)
- Score from
- GitHub Advisory Database (GHSA-p64x-8rxx-wf6q)
- Attack vector
- network
- Attack complexity
- low
- Privileges required
- none
- User interaction
- none
- Weakness
- CWE-89
Unknowns
- We show one CVSS score. Other sources may score this CVE differently.
Advisory text
Quoted from the source advisory (untrusted)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.
Update history
- 25 Nov 2025Exploitation more likely 51.0% → 92.7%
References
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2022-34265
- commit / pull requesthttps://github.com/django/django/commit/0dc9c016fadb71a067e5a42be30164e3f96c0492
- commit / pull requesthttps://github.com/django/django/commit/5e2f4ddf2940704a26a4ac782b851989668d74db
- commit / pull requesthttps://github.com/django/django/commit/877c800f255ccaa7abde1fb944de45d1616f5cc9
- commit / pull requesthttps://github.com/django/django/commit/a9010fe5555e6086a9d9ae50069579400ef0685e
- otherhttps://docs.djangoproject.com/en/4.0/releases/security
- advisoryhttps://github.com/advisories/GHSA-p64x-8rxx-wf6q
- otherhttps://github.com/django/django
- otherhttps://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-213.yaml
- otherhttps://groups.google.com/forum/#!forum/django-announce
- otherhttps://lists.fedoraproject.org/archives/list/[email protected]/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK
- otherhttps://lists.fedoraproject.org/archives/list/[email protected]/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI
- otherhttps://security.netapp.com/advisory/ntap-20220818-0006
- otherhttps://www.debian.org/security/2022/dsa-5254
- otherhttps://www.djangoproject.com/weblog/2022/jul/04/security-releases
- otherhttps://www.djangoproject.com/weblog/2022/jul/04/security-releases/
- otherhttps://docs.djangoproject.com/en/4.0/releases/security/
Sources
- EPSS by FIRST.org, Free to use, attribution requested. Scores generated by Empirical Security.
- GHSA-p64x-8rxx-wf6q (GitHub Advisory Database), CC BY 4.0.
- PYSEC-2022-213 (PyPA Advisory Database), CC BY 4.0.
- OSV.dev, Per database.
This page is our own presentation: records are shortened, normalised and merged. Licences
Last checked: kev 37 min ago · osv 36 min ago · nvd 6 min ago · epss 36 min ago · JSON · ask via MCP: explain_vulnerability
Also known as BIT-django-2022-34265, GHSA-p64x-8rxx-wf6q, PYSEC-2022-213