CVE-2025-64459Djangoproject Django
Inyección SQL en QuerySet y Q() de Django
Crítica 9.1 Sin autenticación
Seguir: esta CVE · Djangoproject · Djangoproject Django Te avisamos por email o Slack (requiere cuenta).
- Prioridad
- 70
- CVSS 3.1
- 9.1
- EPSS
- —
- Requiere autenticación
- No
- Publicada
- 5 nov 2025
- Actualizada
- 17 jun 2026
- Categoría
- Aplicación · Multiplataforma
- Debilidad (CWE)
- CWE-89
- SSVC (CISA)
- Explotación: ninguna · Automatizable: sí · Impacto técnico: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Qué pasa
Django 4.2, 5.1 y 5.2 son vulnerables a inyección SQL en los métodos QuerySet.filter(), QuerySet.exclude(), QuerySet.get() y la clase Q() cuando se usa un diccionario especialmente diseñado con expansión de diccionario como argumento _connector. Un atacante sin autenticación puede ejecutar consultas SQL arbitrarias contra la base de datos.
Ver el texto original de NVD (en inglés)
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.
Qué hacer
Hay parche · versiones corregidas: 4.2.26, 5.1.14, 5.2.8
Actualiza Django a versión 4.2.26, 5.1.14 o 5.2.8 según la serie que uses.
- Aplica la actualización de seguridad del fabricante para Django.
- Se explota sin autenticación: si no puedes parchear ya, limita el acceso desde Internet al servicio afectado.
Paquetes afectados
| Ecosistema | Paquete | Versiones afectadas | Corregida en | Cómo actualizar |
|---|---|---|---|---|
| PyPI | django |
≥ 5.2a1 < 5.2.8 |
5.2.8 |
pip install "django>=5.2.8" |
| PyPI | django |
≥ 5.0a1 < 5.1.14 |
5.1.14 |
pip install "django>=5.1.14" |
| PyPI | django |
< 4.2.26 |
4.2.26 |
pip install "django>=4.2.26" |
| PyPI | django |
≥ 4.2 < 4.2.26 |
4.2.26 |
pip install "django>=4.2.26" |
| PyPI | django |
≥ 5.1 < 5.1.14 |
5.1.14 |
pip install "django>=5.1.14" |
| PyPI | django |
≥ 5.2 < 5.2.8 |
5.2.8 |
pip install "django>=5.2.8" |
Según OSV / GitHub Advisories (GHSA-frmv-pr5f-9mcr, PYSEC-2025-108). Verifica la versión en tu lockfile antes de actualizar.
Productos afectados (CPE)
| Fabricante | Producto | Versiones |
|---|---|---|
| djangoproject | django | ≥ 4.2 < 4.2.26 |
| djangoproject | django | ≥ 5.1 < 5.1.14 |
| djangoproject | django | ≥ 5.2 < 5.2.8 |
En redes
1 persona y 1 post en Bluesky en los últimos 30 días.
Los posts más recientes, sin bots ni feeds automáticos. El texto es de sus autores. Buscar en Bluesky
Fuentes oficiales
Referencias
Enlaces publicados por las fuentes. Ábrelos con criterio.
- docs.djangoproject.com Vendor Advisory
- groups.google.com Mailing List
- www.djangoproject.com Vendor Advisory
- shivasurya.me Exploit Third Party Advisory