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

18 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
2:2.2.28-1~deb11u103:3.2.25-0+deb12u13:4.2.27-0+deb13u13:4.2.26-1
ubuntu/python-django<2:2.2.12-1ubuntu0.29+esm5
2:2.2.12-1ubuntu0.29+esm5
ubuntu/python-django<2:3.2.12-2ubuntu1.23
2:3.2.12-2ubuntu1.23
ubuntu/python-django<3:4.2.11-1ubuntu1.12
3:4.2.11-1ubuntu1.12
ubuntu/python-django<3:5.2.4-1ubuntu2.1
3:5.2.4-1ubuntu2.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 2:2.2.28-1~deb11u10Fixed in 3:3.2.25-0+deb12u1Fixed in 3:4.2.27-0+deb13u1Fixed in 3:4.2.26-1
  6. Upgrade

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

    Fixed in 2:2.2.12-1ubuntu0.29+esm5
  7. Upgrade

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

    Fixed in 2:3.2.12-2ubuntu1.23
  8. Upgrade

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

    Fixed in 3:4.2.11-1ubuntu1.12
  9. Upgrade

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

    Fixed in 3:5.2.4-1ubuntu2.1

Event History

Nov 5, 2025
CVE Published
via OSV·12:00 AM
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·03:09 PM
Data Sourced
via MITRE·03:09 PM
DescriptionWeakness
Data Sourced
via NVD·03:15 PM
DescriptionWeakness
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
Data Sourced
via NVD·05:15 PM
Severity
Nov 6, 2025
Exploit Published
via GitHub·08:21 AM
Nov 10, 2025
News Published
via The Hacker News·12:51 PM
Data Sourced
via NVD·06:25 PM
Affected Software
Dec 8, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Nov 17, 2026
Data Sourced
via OSV·02:45 AM
Weakness

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