Amenazas en vivo

Todas las CVE / Sqlparse Project

CVE-2021-32839Sqlparse Project Sqlparse

Alta 7.5 Sin autenticación

Prioridad
60
CVSS 3.1
7.5
EPSS
2.3%
probabilidad de explotación en 30 días · percentil 84
Requiere autenticación
No
Publicada
20 sep 2021
Actualizada
17 jun 2026
Categoría
Aplicación · Multiplataforma
Debilidad (CWE)
CWE-400
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Qué pasa

sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.

Texto original de NVD, en inglés. La traducción y el resumen en español llegan pronto.

Qué hacer

  1. Aplica la actualización de seguridad del fabricante para Sqlparse.
  2. Se explota sin autenticación: si no puedes parchear ya, limita el acceso desde Internet al servicio afectado.

Paquetes afectados

EcosistemaPaqueteVersiones afectadasCorregida enCómo actualizar
PyPI sqlparse ≥ 0.4.0 < 0.4.2 0.4.2 pip install "sqlparse>=0.4.2"
PyPI sqlparse ≥ 0.4.0 < 0.4.2 0.4.2 pip install "sqlparse>=0.4.2"

Según OSV / GitHub Advisories (GHSA-p5w8-wqhj-9hhf, PYSEC-2021-333). Verifica la versión en tu lockfile antes de actualizar.

Productos afectados (CPE)

FabricanteProductoVersiones
sqlparse_projectsqlparse≥ 0.4.0 < 0.4.2

Boletines oficiales

Avisos de fabricantes, CERT y distribuciones que nombran esta CVE. Títulos sin modificar.

Fuentes oficiales

Referencias

Enlaces publicados por las fuentes. Ábrelos con criterio.