CVE-2025-64459: SQL injection in Django QuerySet and Q via _connector
- Vendor
- Djangoproject
CVE-2025-64459 is a SQL injection vulnerability in Django's QuerySet.filter(), QuerySet.exclude(), QuerySet.get(), and Q() class. A suitably crafted dictionary expanded into keyword arguments can supply a malicious _connector value that alters the generated SQL. Affected supported releases are Django 4.2 before 4.2.26, 5.1 before 5.1.14, and 5.2 before 5.2.8. Earlier unsupported series, including 5.0, 4.1, and 3.2, were not evaluated upstream and may also be affected.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise database confidentiality and integrity through unauthorized queries, data disclosure, and data modification. Availability disruption and broader database compromise depend on the application, database backend, and privileges available to the application's database connection. Operating-system command execution is not an established general outcome of this vulnerability.
Mitigation
If you can’t patch tonight, do this now.
Until patched, prevent untrusted dictionaries from being expanded directly into affected ORM calls. Construct query arguments from an explicit allowlist and keep _connector under application control. Review affected call sites for user-controlled keyword arguments. These application-level precautions are not a substitute for upgrading; Red Hat lists no mitigation meeting its Product Security criteria.
Remediation
Patch, then assume compromise.
Upgrade Django to 4.2.26 or later in the 4.2 series, 5.1.14 or later in the 5.1 series, or 5.2.8 or later in the 5.2 series; preferably use a currently supported, patched release. For vendor-packaged deployments, install the applicable vendor security update. Red Hat addressed affected Ansible Automation Platform 2.5 for RHEL 8 components through RHSA-2025:23069.
Exploits
7 exploits validated by Mallory's analysis. Hidden: 8 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2025-64459 exploited in the wild?
- As of Nov 29, 2026, Mallory has no reports of CVE-2025-64459 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-64459?
- Yes. Mallory tracks 7 public exploits or proofs of concept for CVE-2025-64459, the earliest disclosed Dec 1, 2025.
- Is there a patch for CVE-2025-64459?
- Upgrade Django to 4.2.26 or later in the 4.2 series, 5.1.14 or later in the 5.1 series, or 5.2.8 or later in the 5.2 series; preferably use a currently supported, patched release. For vendor-packaged deployments, install the applicable vendor security update.
- What products are affected by CVE-2025-64459?
- Djangoproject Django.
- How severe is CVE-2025-64459?
- CVE-2025-64459 has a CVSS v3.1 score of 9.1 (Critical) and an EPSS score of 19.5% (97th percentile) as of Nov 29, 2026.
Recent activity
33 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.