7.5high
Regular Expression Denial of Service (ReDoS) in gradio-app/gradio
- Severity
- 7.5high CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 1.10% (higher than 66% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- @huntr_ai
- Also known as
- GHSA-rvgh-pr46-x7ggPYSEC-2026-1421
Description
A Regular Expression Denial of Service (ReDoS) vulnerability exists in the gradio-app/gradio repository, affecting the gr.Datetime component. The affected version is git commit 98cbcae. The vulnerability arises from the use of a regular expression `^(?:\s*now\s*(?:-\s*(\d+)\s*([dmhs]))?)?\s*$` to process user input. In Python's default regex engine, this regular expression can take polynomial time to match certain crafted inputs. An attacker can exploit this by sending a crafted HTTP request, causing the gradio process to consume 100% CPU and potentially leading to a Denial of Service (DoS) condition on the server.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gradio-app gradio-app/gradio | from unspecified up to latest | CVE List |
| gradio (PyPI) | from 4.38.0 up to 5.0.0-beta.2 | GitHub Advisory Database, PyPA Advisory Database |
| gradio_project gradio | 2024-09-18 | NVD |
All scores
| @huntr_ai | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | 7.5high CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
A Regular Expression Denial of Service (ReDoS) vulnerability exists in the gradio-app/gradio repository, affecting the gr.Datetime component. The affected version is git commit 98cbcae. The vulnerability arises from the use of a regular expression `^(?:\s*now\s*(?:-\s*(\d+)\s*([dmhs]))?)?\s*$` to process user input. In Python's default regex engine, this regular expression can take polynomial time to match certain crafted inputs. An attacker can exploit this by sending a crafted HTTP request, causing the gradio process to consume 100% CPU and potentially leading to a Denial of Service (DoS) condition on the server.
NVD (es)
Existe una vulnerabilidad de denegación de servicio de expresiones regulares (ReDoS) en el repositorio gradio-app/gradio, que afecta al componente gr.Datetime. La versión afectada es el commit git 98cbcae. La vulnerabilidad surge del uso de la expresión regular `^(?:\s*now\s*(?:-\s*(\d+)\s*([dmhs]))?)?\s*$` para procesar la entrada del usuario. En el motor de expresiones regulares predeterminado de Python, esta expresión regular puede tardar un tiempo polinomial en coincidir con ciertas entradas manipuladas. Un atacante puede explotar esto enviando una solicitud HTTP manipulada, lo que provoca que el proceso gradio consuma el 100 % de la CPU y potencialmente genere una denegación de servicio (DoS) en el servidor.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-10624 changed 2025-10-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rvgh-pr46-x7gg changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2024-10624 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1421 changed 2026-07-07 | CC-BY-4.0 |