CVE-2025-64459CWE-89

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

Critical · published November 5, 2025

CVSS v3.1
9.1
EPSS
19%
Percentile
97.3
In the wild
Unconfirmed
What it is

🔥 A crafty crafted dictionary is all it takes to unleash SQL injection mayhem in several Django versions, including 5.1 before 5.1.14! Think of this like a restaurant where an employee can sneakily change the menu items without the chef noticing. If the kitchen staff trusts any order without confirming its details, they could end up serving anything—and that’s exactly what attackers could do with your database! An attacker could use this vulnerability to execute malicious SQL commands that could compromise your data integrity, potentially allowing them to read, modify, or delete sensitive information. This could be absolutely devastating for your application and its users!

Put simply

Think of this like a restaurant where an employee can sneakily change the menu items without the chef noticing. If the kitchen staff trusts any order without confirming its details, they could end up serving anything—and that’s exactly what attackers could do with your database! This vulnerability arises from the improper handling of the `_connector` argument in methods like `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`. When a specially crafted dictionary is passed, an attacker can manipulate SQL queries due to insufficient validation.

What to do

An attacker could use this vulnerability to execute malicious SQL commands that could compromise your data integrity, potentially allowing them to read, modify, or delete sensitive information. This could be absolutely devastating for your application and its users! Immediate action is crucial! Upgrade your Django version to at least 5.1.14, 4.2.26, or 5.2.8 to close this dangerous loophole. If you’re maintaining an older version like 5.0.x or 4.1.x, consider updating those as well as they may also be vulnerable! You’ve got this! By following these steps, you’ll bolster your defenses and secure your application in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.19257 · 97.3th percentile
Weakness
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2025-11-05T15:09Z
EPSS history
Timeline
  • 05 NOV 15:09Z
    Potential SQL injection via _connector keyword argument in QuerySet and Q objects
    cvelistv5