Security Digest · Vulnerability record
CVE-2025-64459: Django vulnerable to SQL injection via _connector keyword argument in QuerySet and Q objects.
An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8.
CVSS 9.1 Critical EPSS 19.3% · p97
Should you act?
High exploit likelihood
EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 19.3%, percentile 97: FIRST’s model estimates a 19.3% chance of exploitation activity in the next 30 days, higher than 97% of all scored CVEs (very high). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
django(PyPI) >= 5.2a1, < 5.2.8, fixed in 5.2.8;django(PyPI) >= 5.0a1, < 5.1.14, fixed in 5.1.14;django(PyPI) < 4.2.26, fixed in 4.2.26. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
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.
Weakness type: CWE-89.
Product: django (PyPI) · Assigned by: DSF · Published: 2025-11-05
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | django | >= 5.2a1, < 5.2.8 | 5.2.8 |
| PyPI | django | >= 5.0a1, < 5.1.14 | 5.1.14 |
| PyPI | django | < 4.2.26 | 4.2.26 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| djangoproject | Django | 5.2 < 5.2.8, 5.1 < 5.1.14, 4.2 < 4.2.26 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADP | 3.1 | 9.1 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 19.26% probability of exploitation activity in the next 30 days; percentile 97.
Timeline
- — CVE record published by DSF
- — GitHub-reviewed advisory GHSA-frmv-pr5f-9mcr published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vendor and project advisories, patches
- Django security archive docs.djangoproject.com
- Django security releases issued: 5.2.8, 5.1.14, and 4.2.26 djangoproject.com
Vulnerability records
- GitHub Advisory GHSA-frmv-pr5f-9mcr github.com
- CVE.org record CVE-2025-64459 cve.org
- NVD entry CVE-2025-64459 nvd.nist.gov
Other references from the CVE record and advisory
- Django releases announcements groups.google.com
- shivasurya.me shivasurya.me
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com