CVE-2025-64459: Potential SQL injection via _connector keyword argument in QuerySet and Q objects

Published Nov 5, 2025
·
Updated

An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. The methods QuerySet.filter(), QuerySet.exclude(), and QuerySet.get(), and the class Q(), are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the connector argument. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank cyberstan for reporting this issue.

Affected Software

14 affected componentsFixes available
Django Django<5.1.14
Django Django<4.2.26
Django Django<5.2.8
djangoproject Django>=4.2<4.2.26
djangoproject Django>=5.1<5.1.14
djangoproject Django>=5.2<5.2.8
pip/django<4.2.26
4.2.26
pip/django>=5.0a1<5.1.14
5.1.14
pip/django>=5.2a1<5.2.8
5.2.8
IBM Storage Defender - Resiliency Service<=2.0.0 - 2.0.18
alpine/py3-django<4.2.26-r0
4.2.26-r0
alpine/py3-django<4.2.26-r0
4.2.26-r0
alpine/py3-django<4.2.26-r0
4.2.26-r0
debian/python-django
3:3.2.25-0+deb12u33:3.2.25-0+deb12u63:4.2.28-0+deb13u23:4.2.28-0+deb13u13:5.2.17-23:5.2.19-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 4.2.26
  2. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 5.1.14
  3. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 5.2.8
  4. Upgrade

    Upgrade alpine/py3-django to a version that resolves this vulnerability.

    Fixed in 4.2.26-r0
  5. Upgrade

    Upgrade debian/python-django to a version that resolves this vulnerability.

    Fixed in 3:3.2.25-0+deb12u3Fixed in 3:3.2.25-0+deb12u6Fixed in 3:4.2.28-0+deb13u2Fixed in 3:4.2.28-0+deb13u1Fixed in 3:5.2.17-2Fixed in 3:5.2.19-1

Event History

Nov 5, 2025
CVE Published
via MITRE·03:09 PM
Data Sourced
via MITRE·03:09 PM
DescriptionWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·03:31 PM
Data Sourced
via GitHub·03:31 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·04:01 PM
DescriptionSeverityAffected Software
Nov 6, 2025
Exploit Published
via GitHub·08:21 AM
Dec 8, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-64459?

CVE-2025-64459 has a high severity due to its potential for SQL injection vulnerabilities in certain Django versions.

2

How do I fix CVE-2025-64459?

To fix CVE-2025-64459, upgrade Django to version 5.1.14, 4.2.26, or 5.2.8 or later.

3

Which Django versions are affected by CVE-2025-64459?

CVE-2025-64459 affects Django versions prior to 5.1.14, 4.2.26, and 5.2.8.

4

What types of methods in Django are impacted by CVE-2025-64459?

The methods impacted by CVE-2025-64459 include QuerySet.filter(), QuerySet.exclude(), QuerySet.get(), and the class Q().

5

What is the nature of the vulnerability in CVE-2025-64459?

CVE-2025-64459 is a SQL injection vulnerability that occurs when using dictionary expansion with certain QuerySet methods.

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