# CVE-2025-59681

- Priority: **Routine**
- Reason: Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-10-01 · Modified: 2025-11-04
- Aliases: GHSA-hpr9-3m2g-3j9p, BIT-django-2025-59681, PYSEC-2025-106, UBUNTU-CVE-2025-59681, DEBIAN-CVE-2025-59681, CGA-h86q-qvpq-rx5h, CGA-qmh9-xcxq-v8cm, ALPINE-CVE-2025-59681
- Record: https://cvemate.com/vulnerability/CVE-2025-59681 · JSON: https://cvemate.com/vulnerability/CVE-2025-59681/json

## Description

```text
An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and MariaDB).
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.662%, percentile 53.073%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine py3-django (Alpine Linux): \< 4.2.25-r0
- chainguard awx (Chainguard): \< 24.6.1-r17
- debian python-django (Debian): \< 3:3.2.25-0+deb12u1 \| \< 3:4.2.27-0+deb13u1 \| \< 3:4.2.25-1
- ubuntu python-django (Ubuntu): \< 1.6.11-0ubuntu1.3+esm8 \| \< 1.8.7-1ubuntu5.15+esm9 \| \< 1:1.11.11-1ubuntu1.21+esm12 \| \< 2:2.2.12-1ubuntu0.29+esm4 \| \< 2:3.2.12-2ubuntu1.22 \| \< 3:4.2.11-1ubuntu1.11 \| \< 3:5.2.4-1ubuntu2
- djangoproject django: ≥ 4.2, \< 4.2.25 \| ≥ 5.1, \< 5.1.13 \| ≥ 5.2, \< 5.2.7
- PyPI django (PyPI): ≥ 4.2, \< 4.2.25 \| ≥ 5.1, \< 5.1.13 \| ≥ 5.2, \< 5.2.7

## References

- <https://docs.djangoproject.com/en/dev/releases/security/>
- <https://groups.google.com/g/django-announce>
- <https://www.djangoproject.com/weblog/2025/oct/01/security-releases/>
- <http://www.openwall.com/lists/oss-security/2025/10/01/3>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59681>
- <https://github.com/django/django/commit/41b43c74bda19753c757036673ea9db74acf494a>
- <https://github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e>
- <https://docs.djangoproject.com/en/dev/releases/security>
- <https://github.com/django/django>
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-106.yaml>
- <https://www.djangoproject.com/weblog/2025/oct/01/security-releases>
- <https://github.com/advisories/GHSA-hpr9-3m2g-3j9p>
- <https://ubuntu.com/security/CVE-2025-59681>
- <https://www.cve.org/CVERecord?id=CVE-2025-59681>
- <https://ubuntu.com/security/notices/USN-7794-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-59681>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59681.json>
- <https://security.alpinelinux.org/vuln/CVE-2025-59681>

---

Data as of 2026-12-05T06:10:58.775Z. 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
