CVE-2024-10624: CWE-1333 Inefficient Regular Expression Complexity in gradio-app gradio-app/gradio
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.
AI Analysis
Technical Summary
CVE-2024-10624 identifies a Regular Expression Denial of Service (ReDoS) vulnerability in the gradio-app/gradio repository, specifically within the gr.Datetime component. The root cause is an inefficient regular expression: `^(?:\s*now\s*(?:-\s*(\d+)\s*([dmhs]))?)?\s*$`, which is used to parse user input representing relative datetime expressions. Python's default regex engine can exhibit polynomial time complexity when processing certain crafted inputs against this pattern, leading to excessive CPU consumption. An attacker can exploit this by sending specially crafted HTTP requests containing malicious input strings that trigger worst-case regex evaluation. This results in the gradio process consuming 100% CPU, causing a denial of service (DoS) condition by making the service unresponsive or severely degraded. The vulnerability requires no authentication or user interaction, making it remotely exploitable over the network. Although no public exploits are currently known, the high CVSS score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) indicates a high impact on availability with low attack complexity. The vulnerability affects unspecified versions of gradio prior to a fix, and no official patch links are provided yet. This vulnerability is categorized under CWE-1333 (Inefficient Regular Expression Complexity), highlighting the importance of efficient regex design in input validation components.
Potential Impact
For European organizations, especially those leveraging gradio for interactive machine learning, data visualization, or AI model deployment, this vulnerability poses a significant risk of service disruption. An attacker exploiting this flaw can cause denial of service by exhausting CPU resources on servers hosting gradio applications, potentially leading to downtime and degraded user experience. This can impact critical business operations, customer-facing services, or internal data science workflows. Since gradio is often used in research institutions, startups, and enterprises adopting AI, the availability impact can affect innovation and productivity. The lack of confidentiality or integrity impact means data breaches or tampering are unlikely, but service outages can still cause reputational damage and financial loss. Additionally, automated attack tools could leverage this vulnerability for large-scale DoS campaigns against exposed gradio endpoints. Organizations with public-facing gradio services are at higher risk, while internal deployments may be less exposed but still vulnerable to insider threats or lateral movement attacks.
Mitigation Recommendations
To mitigate CVE-2024-10624, organizations should first identify and inventory all gradio deployments, focusing on versions prior to the fix. Since no official patch is currently linked, developers should consider modifying the vulnerable regex pattern to a more efficient alternative that avoids catastrophic backtracking. Input validation should be enhanced to reject suspicious or overly complex datetime strings before regex processing. Implementing rate limiting and request throttling on gradio endpoints can reduce the risk of DoS attacks by limiting the number of malicious requests an attacker can send. Deploying web application firewalls (WAFs) with custom rules to detect and block malicious input patterns can provide additional protection. Monitoring CPU usage and application logs for anomalies can help detect exploitation attempts early. Organizations should stay alert for official patches or updates from the gradio project and apply them promptly once available. Finally, isolating gradio services in containerized or sandboxed environments can limit the impact of potential DoS conditions on broader infrastructure.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland
CVE-2024-10624: CWE-1333 Inefficient Regular Expression Complexity in gradio-app gradio-app/gradio
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.
AI-Powered Analysis
Technical Analysis
CVE-2024-10624 identifies a Regular Expression Denial of Service (ReDoS) vulnerability in the gradio-app/gradio repository, specifically within the gr.Datetime component. The root cause is an inefficient regular expression: `^(?:\s*now\s*(?:-\s*(\d+)\s*([dmhs]))?)?\s*$`, which is used to parse user input representing relative datetime expressions. Python's default regex engine can exhibit polynomial time complexity when processing certain crafted inputs against this pattern, leading to excessive CPU consumption. An attacker can exploit this by sending specially crafted HTTP requests containing malicious input strings that trigger worst-case regex evaluation. This results in the gradio process consuming 100% CPU, causing a denial of service (DoS) condition by making the service unresponsive or severely degraded. The vulnerability requires no authentication or user interaction, making it remotely exploitable over the network. Although no public exploits are currently known, the high CVSS score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) indicates a high impact on availability with low attack complexity. The vulnerability affects unspecified versions of gradio prior to a fix, and no official patch links are provided yet. This vulnerability is categorized under CWE-1333 (Inefficient Regular Expression Complexity), highlighting the importance of efficient regex design in input validation components.
Potential Impact
For European organizations, especially those leveraging gradio for interactive machine learning, data visualization, or AI model deployment, this vulnerability poses a significant risk of service disruption. An attacker exploiting this flaw can cause denial of service by exhausting CPU resources on servers hosting gradio applications, potentially leading to downtime and degraded user experience. This can impact critical business operations, customer-facing services, or internal data science workflows. Since gradio is often used in research institutions, startups, and enterprises adopting AI, the availability impact can affect innovation and productivity. The lack of confidentiality or integrity impact means data breaches or tampering are unlikely, but service outages can still cause reputational damage and financial loss. Additionally, automated attack tools could leverage this vulnerability for large-scale DoS campaigns against exposed gradio endpoints. Organizations with public-facing gradio services are at higher risk, while internal deployments may be less exposed but still vulnerable to insider threats or lateral movement attacks.
Mitigation Recommendations
To mitigate CVE-2024-10624, organizations should first identify and inventory all gradio deployments, focusing on versions prior to the fix. Since no official patch is currently linked, developers should consider modifying the vulnerable regex pattern to a more efficient alternative that avoids catastrophic backtracking. Input validation should be enhanced to reject suspicious or overly complex datetime strings before regex processing. Implementing rate limiting and request throttling on gradio endpoints can reduce the risk of DoS attacks by limiting the number of malicious requests an attacker can send. Deploying web application firewalls (WAFs) with custom rules to detect and block malicious input patterns can provide additional protection. Monitoring CPU usage and application logs for anomalies can help detect exploitation attempts early. Organizations should stay alert for official patches or updates from the gradio project and apply them promptly once available. Finally, isolating gradio services in containerized or sandboxed environments can limit the impact of potential DoS conditions on broader infrastructure.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2024-10-31T16:30:57.959Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 68ef9b22178f764e1f470a27
Added to database: 10/15/2025, 1:01:22 PM
Last enriched: 10/15/2025, 1:15:12 PM
Last updated: 10/16/2025, 2:53:21 PM
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-41253: CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection') in VMware Spring Cloud Gateway Server Webflux
HighCVE-2025-54658: Escalation of privilege in Fortinet FortiDLP
HighCVE-2025-53951: Escalation of privilege in Fortinet FortiDLP
MediumCVE-2025-53950: Information disclosure in Fortinet FortiDLP
MediumCVE-2025-46752: Information disclosure in Fortinet FortiDLP
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.