{"id":"CVE-2025-64459","published":"2025-11-05T15:09:58Z","modified":"2026-02-26T17:47:16Z","title":"Potential SQL injection via _connector keyword argument in QuerySet and Q objects","vendor":"djangoproject","product":"Django","tier":"tail","description":{"text":"An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8.\nThe 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.\nEarlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\nDjango would like to thank cyberstan for reporting this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.19257,"percentile":0.97404,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://docs.djangoproject.com/en/dev/releases/security/","tags":["vendor-advisory"]},{"url":"https://groups.google.com/g/django-announce","tags":["mailing-list"]},{"url":"https://www.djangoproject.com/weblog/2025/nov/05/security-releases/","tags":["vendor-advisory"]},{"url":"https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html","tags":[]}],"priority":{"score":30.9,"factors":[{"name":"EPSS percentile","points":19.48},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.37}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2025-12-03"},"pocGithub":{"count":7,"skipped":3,"earliest":"2025-11-10","earliestUrl":"https://github.com/nunpa/CVE-2025-64459","repos":[{"name":"omarkurt/django-connector-CVE-2025-64459-testbed","url":"https://github.com/omarkurt/django-connector-CVE-2025-64459-testbed","stars":2,"created":"2025-11-21"},{"name":"0xCyberstan/CVE-2025-64459-Poc","url":"https://github.com/0xCyberstan/CVE-2025-64459-Poc","stars":2,"created":"2025-12-01"},{"name":"nunpa/CVE-2025-64459","url":"https://github.com/nunpa/CVE-2025-64459","stars":1,"created":"2025-11-10"},{"name":"purehate/CVE-2025-64459-hunter","url":"https://github.com/purehate/CVE-2025-64459-hunter","stars":0,"created":"2026-01-14"},{"name":"joshualent/django-cve-2025-64459","url":"https://github.com/joshualent/django-cve-2025-64459","stars":0,"created":"2026-03-09"}]},"first":{"date":"2025-11-10","source":"PoC-in-GitHub","url":"https://github.com/nunpa/CVE-2025-64459"},"provenance":"source"},"vendorSlug":"djangoproject","affectedVersions":[{"vendor":"djangoproject","product":"Django","versions":[">= 5.2, < 5.2.8",">= 5.1, < 5.1.14",">= 4.2, < 4.2.26"]}],"fixedVersions":[{"vendor":"djangoproject","product":"Django","versions":["5.2.8","5.1.14","4.2.26"]}],"capec":[{"id":"CAPEC-66","name":"SQL Injection"}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-11-06T04:55:36.221321Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"django","vulnerableRanges":[">=5.2a1, <5.2.8",">=5.0a1, <5.1.14","<4.2.26",">=4.2, <4.2.26",">=5.1, <5.1.14",">=5.2, <5.2.8"],"patched":["5.2.8","5.1.14","4.2.26"],"from":["GHSA-frmv-pr5f-9mcr","PYSEC-2025-108"],"provenance":"source"}],"summary":{"text":"SQL injection exists in Django's QuerySet.filter(), QuerySet.exclude(), and QuerySet.get() methods and the Q() class, where the _connector argument can be abused when a crafted dictionary is expanded into it. An attacker able to send such input to these methods over the network, with no authentication or user interaction required, could read or modify database contents, affecting the Django 5.1 series before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T00:17:59Z"},"euvd":{"id":"EUVD-2025-37763","exploited":false,"provenance":"source"},"exploits":[{"id":52456,"url":"https://www.exploit-db.com/exploits/52456","title":"Django 5.1.13 - SQL Injection (SQLi)","date":"2025-12-03","verified":false,"provenance":"source"}]}