CVE-2025-64459

Potential SQL injection via _connector keyword argument in QuerySet and Q objects

Published Nov 5, 2025 CVSS 3.1 · 9.1 Critical EPSS 19.3% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4425-1 python-django security update
Debian DSA Debian DSA DSA-6117-1 python-django security update
Debian DSA Debian DSA DSA-6136-1 python-django security update
Github GHSA Github GHSA GHSA-frmv-pr5f-9mcr Django vulnerable to SQL injection via _connector keyword argument in QuerySet and Q objects.
Ubuntu USN Ubuntu USN USN-7859-1 Django vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject django
Vendors & Products Djangoproject
Djangoproject django
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Potential SQL injection via _connector keyword argument in QuerySet and Q objects
Weaknesses CWE-89
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
DSF
Published
Updated
Feb 26, 2026, 5:47 PM
Reserved
Nov 4, 2025, 2:35 PM
Status
Analyzed
Published
Nov 5, 2025, 3:15 PM
Modified
Jun 17, 2026, 9:54 AM
Severity
Important
Public date
Nov 5, 2025, 3:09 PM