The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-64459

CVE-2025-64459: Django QuerySet SQL Injection Vulnerability

CVE-2025-64459 is a SQL injection vulnerability in Django's QuerySet methods affecting versions 5.1, 4.2, and 5.2. Attackers can exploit filter(), exclude(), and get() methods using crafted dictionaries. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 11, 2026

CVE-2025-64459 Overview

A critical SQL Injection vulnerability has been discovered in Django, a popular Python web framework. The vulnerability affects the methods QuerySet.filter(), QuerySet.exclude(), and QuerySet.get(), as well as the Q() class. When a suitably crafted dictionary with dictionary expansion is used as the _connector argument, attackers can inject arbitrary SQL commands into database queries.

This vulnerability allows unauthenticated attackers to manipulate database queries remotely, potentially leading to unauthorized data access and data manipulation. Django has acknowledged the security researcher cyberstan for reporting this issue.

Critical Impact

Unauthenticated remote attackers can exploit this SQL injection vulnerability to access or modify sensitive database contents without user interaction.

Affected Products

  • Django 5.1 before 5.1.14
  • Django 4.2 before 4.2.26
  • Django 5.2 before 5.2.8
  • Earlier unsupported Django series (5.0.x, 4.1.x, 3.2.x) may also be affected

Discovery Timeline

  • 2025-11-05 - Django Project releases security patches
  • 2025-11-05 - CVE-2025-64459 published to NVD
  • 2025-11-10 - Last updated in NVD database

Technical Details for CVE-2025-64459

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) exists in Django's QuerySet API, specifically within the filter(), exclude(), and get() methods, as well as the Q() class used for complex query construction. The flaw occurs when dictionary expansion (**kwargs) is used with a maliciously crafted dictionary containing the _connector argument.

Under normal circumstances, the _connector parameter is used internally by Django to specify how query conditions should be combined (using AND or OR operators). However, insufficient input validation on this parameter allows an attacker to inject arbitrary SQL syntax when user-controlled data reaches these methods through dictionary expansion.

The vulnerability is exploitable over the network without authentication or user interaction, making it particularly dangerous for Django applications that process user-supplied input in database queries.

Root Cause

The root cause is improper input validation on the _connector argument when passed via dictionary expansion to QuerySet methods. Django failed to sanitize or validate the _connector parameter, allowing malicious SQL fragments to be incorporated directly into generated SQL queries. This bypasses Django's ORM protections that normally prevent SQL injection through parameterized queries.

Attack Vector

The attack can be executed remotely over the network by an unauthenticated attacker. The exploitation scenario involves:

  1. An attacker identifies a Django application endpoint that passes user-controlled dictionary data to QuerySet.filter(), QuerySet.exclude(), QuerySet.get(), or the Q() class
  2. The attacker crafts a malicious dictionary containing a poisoned _connector key with SQL injection payloads
  3. When this dictionary is expanded using **kwargs syntax in the application code, the malicious _connector value is processed by Django
  4. The SQL injection payload is incorporated into the database query, allowing unauthorized data access or modification

For detailed technical analysis and exploitation mechanics, refer to the Shivasurya Analysis on CVE-2025-64459.

Detection Methods for CVE-2025-64459

Indicators of Compromise

  • Unusual or malformed SQL queries in database logs containing unexpected _connector values
  • Web application firewall (WAF) alerts for SQL injection patterns in POST/GET parameters
  • Database error logs showing SQL syntax errors or injection attempt failures
  • Unexpected data access patterns or unauthorized database modifications
  • HTTP requests containing dictionary-like payloads with _connector keys

Detection Strategies

  • Deploy SQL injection detection rules on web application firewalls to inspect dictionary parameters
  • Enable detailed database query logging and monitor for anomalous _connector values in queries
  • Implement application-level logging to track dictionary expansion operations in QuerySet methods
  • Use runtime application self-protection (RASP) solutions to detect SQL injection attempts
  • Monitor for exploit attempts using known PoC patterns related to this vulnerability

Monitoring Recommendations

  • Review Django application logs for requests containing _connector parameters in user input
  • Set up alerts for database queries with unexpected SQL syntax or operators
  • Monitor network traffic for patterns consistent with SQL injection reconnaissance
  • Enable Django's security logging to capture suspicious ORM operations
  • Correlate web server access logs with database audit logs to identify exploitation chains

How to Mitigate CVE-2025-64459

Immediate Actions Required

  • Upgrade Django immediately to version 5.1.14, 4.2.26, or 5.2.8 depending on your current series
  • Audit application code for instances where user-controlled dictionaries are expanded in QuerySet methods
  • Implement input validation to sanitize or reject dictionaries containing _connector keys from user input
  • Deploy WAF rules to block requests containing SQL injection patterns in dictionary parameters
  • If using unsupported Django versions (5.0.x, 4.1.x, 3.2.x), plan immediate migration to supported versions

Patch Information

Django has released security patches addressing this vulnerability. The patched versions are:

  • Django 5.2.8 (for 5.2.x series)
  • Django 5.1.14 (for 5.1.x series)
  • Django 4.2.26 (for 4.2.x series)

Official patch information and release notes are available from the Django Security Release Notes and the Django Weblog Security Releases.

Workarounds

  • Filter and reject any user-supplied dictionaries containing the _connector key before passing to QuerySet methods
  • Implement allowlist validation for dictionary keys when processing user input destined for ORM operations
  • Use explicit keyword arguments instead of dictionary expansion for QuerySet methods where possible
  • Add middleware or decorator validation to strip _connector from incoming request data
  • Consider temporarily disabling endpoints that allow arbitrary dictionary input to QuerySet operations until patching is complete
bash
# Upgrade Django to patched version
pip install --upgrade Django>=5.2.8
# Or for specific series:
pip install Django==5.1.14
pip install Django==4.2.26

# Verify installed version
python -c "import django; print(django.VERSION)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechDjango

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.19%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • Django Announcements Group

  • Shivasurya Analysis on CVE-2025-64459
  • Vendor Resources
  • Django Security Release Notes

  • Django Weblog Security Releases
  • Related CVEs
  • CVE-2026-1287: Django FilteredRelation SQLi Vulnerability

  • CVE-2024-53908: Django HasKey Lookup SQLi Vulnerability

  • CVE-2022-34265: Django Trunc/Extract SQL Injection Flaw

  • CVE-2022-28347: Django QuerySet SQL Injection Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English