CVE-2022-34265: SQL Injection

Published Jun 30, 2022
·
Updated

A flaw was found in Django. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookupname value.

Other sources

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/lookupname value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.

GitHub

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/lookupname value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.

In Django versions 4.0, 4.1 (beta), and 3.2, Trunc() and Extract() database functions were subject to SQL injection if untrusted data was used as a lookupname/kind value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.

Red Hat

Affected Software

12 affected componentsFixes available
redhat/python-django<0:3.2.14-2.el8
0:3.2.14-2.el8
redhat/python-django<0:3.2.14-3.el8
0:3.2.14-3.el8
debian/1:1.10.7-2+deb9u17<=undefined
debian/2:2.2.26-1<=undefined
debian/2:3.2.13-1<=undefined
debian/python-django<=1:1.11.29-1~deb10u1
1:1.11.29-1+deb10u102:2.2.28-1~deb11u23:3.2.19-1+deb12u13:3.2.21-13:4.2.8-1
redhat/python-django<4.0.6
4.0.6
redhat/python-django<3.2.14
3.2.14
pip/Django>=4.0a1<4.0.6
4.0.6
pip/Django>=3.2a1<3.2.14
3.2.14
djangoproject Django>=3.2<3.2.14
djangoproject Django>=4.0<4.0.6

Event History

Jun 30, 2022
Data Sourced
via Red Hat·11:30 PM
DescriptionSeverityAffected Software
Jul 4, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Jul 5, 2022
Advisory Published
via GitHub·12:00 AM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-34265?

CVE-2022-34265 is a vulnerability in Django 3.2 before 3.2.14 and 4.0 before 4.0.6 that allows for SQL injection if untrusted data is used as a kind/lookup_name value in the Trunc() and Extract() database functions.

2

What is the severity of CVE-2022-34265?

CVE-2022-34265 has a severity rating of 9.8 (Critical).

3

How does CVE-2022-34265 affect Django?

CVE-2022-34265 affects Django 3.2 before 3.2.14 and 4.0 before 4.0.6.

4

How can I fix CVE-2022-34265?

To fix CVE-2022-34265, update your Django installation to version 3.2.14 or 4.0.6 depending on your current version.

5

Where can I find more information about CVE-2022-34265?

You can find more information about CVE-2022-34265 on the Debian Security Tracker, the Debian bug report, and the NIST vulnerability database.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203