# CVE-2025-64459: Potential SQL injection via \_connector keyword argument in QuerySet and Q objects

- Priority: **Prioritise**
- Reason: Public exploit (exploit-database, 03-12-2025)
- Next step: Check applicability: affected before 4.2.26, 5.1.14, 5.2.8 (CNA); fix release not confirmed
- Status: published
- Published: 2025-11-05 · Modified: 2026-02-26
- Aliases: MGASA-2025-0292, GHSA-frmv-pr5f-9mcr, BIT-django-2025-64459, PYSEC-2025-108, RHSA-2025:23070, UBUNTU-CVE-2025-64459, USN-7859-1, DEBIAN-CVE-2025-64459, openSUSE-SU-2025:15708-1, openSUSE-SU-2025:15712-1, ALPINE-CVE-2025-64459
- Record: https://cvemate.com/vulnerability/CVE-2025-64459 · JSON: https://cvemate.com/vulnerability/CVE-2025-64459/json

## 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.
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.
```

## Signals

- CVSS: 9.1 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- EPSS: 19.496%, percentile 97.449%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (reference, exploit-database)

## Affected

- alpine py3-django (Alpine Linux): \< 4.2.26-r0
- debian python-django (Debian): \< 3:3.2.25-0+deb12u1 \| \< 3:4.2.27-0+deb13u1 \| \< 3:4.2.26-1
- ubuntu python-django (Ubuntu): \< 2:2.2.12-1ubuntu0.29+esm5 \| \< 2:3.2.12-2ubuntu1.23 \| \< 3:4.2.11-1ubuntu1.12 \| \< 3:5.2.4-1ubuntu2.1
- djangoproject django: ≥ 4.2, \< 4.2.26 \| ≥ 5.1, \< 5.1.14 \| ≥ 5.2, \< 5.2.8
- mageia python-django (Mageia): \< 4.1.13-1.8.mga9
- PyPI django (PyPI): ≥ 5.2a1, \< 5.2.8 \| ≥ 5.0a1, \< 5.1.14 \| \< 4.2.26 \| ≥ 5.2, \< 5.2.8
- opensuse python-Django4&distro=openSUSE Tumbleweed (openSUSE): \< 4.2.26-1.1
- opensuse python-Django&distro=openSUSE Tumbleweed (openSUSE): \< 5.2.8-1.1
- redhat automation-controller-venv-tower (Red Hat): \< 0:4.7.6-1.el9ap
- redhat python3.11-django (Red Hat): \< 0:4.2.26-2.el9ap

## References (first 20 of 30)

- <https://docs.djangoproject.com/en/dev/releases/security/>
- <https://groups.google.com/g/django-announce>
- <https://www.djangoproject.com/weblog/2025/nov/05/security-releases/>
- <https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html>
- <https://advisories.mageia.org/MGASA-2025-0292.html>
- <https://bugs.mageia.org/show_bug.cgi?id=34727>
- <https://www.openwall.com/lists/oss-security/2025/11/05/12>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-64459>
- <https://github.com/django/django/commit/06dd38324ac3d60d83d9f3adabf0dcdf423d2a85>
- <https://github.com/django/django/commit/59ae82e67053d281ff4562a24bbba21299f0a7d4>
- <https://github.com/django/django/commit/6703f364d767e949c5b0e4016433ef75063b4f9b>
- <https://github.com/django/django/commit/72d2c87431f2ae0431d65d0ec792047f078c8241>
- <https://docs.djangoproject.com/en/dev/releases/security>
- <https://github.com/django/django>
- <https://github.com/omarkurt/django-connector-CVE-2025-64459-testbed>
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-108.yaml>
- <https://www.djangoproject.com/weblog/2025/nov/05/security-releases>
- <https://github.com/advisories/GHSA-frmv-pr5f-9mcr>
- <https://access.redhat.com/errata/RHSA-2025:23070>
- <https://access.redhat.com/security/updates/classification/#important>

---

Data as of 2026-12-05T04:50:45.148Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
