arXiv:2609.10294cs.CRSep 2026

Manuscript Offprint

arXiv:2609.10294

An Empirical Analysis of ReDoS Vulnerabilities and ReDoS Detection Tools

N'Zolieh Ismaël Mahassadi, Raphaël Khoury, Justin Vallé, Abdelwahab Hamou-Lhadj

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

N'Zolieh Ismaël Mahassadi¹, Raphaël Khoury¹, Justin Vallé¹, and Abdelwahab Hamou-Lhadj²

¹ Université du Québec en Outaouais, Gatineau, Canada {mahy04,raphael.khoury,valj27}@uqo.ca

² Concordia Universiy, Montréal, Canada wahab.hamou-lhadj@concordia.ca

Abstract. ReDoS vulnerabilities are a type of denial of service software weakness that occurs when a regex is used to validate user-supplied input. In some cases, the regex matching process can take exponential time, leading to a denial of service. In this study, we examine and compare the effectiveness of five publicly-available regex detection tools, and one regex correction tool, using three datasets. We further perform an empirical analysis of all ReDoS vulnerabilities reported to the NVD database in order to understand how they differ from non-ReDoS vulnerabilities and glean insights about this type of weakness. We find that ReDoS vulnerabilities are becoming more prevalent and are much more likely to be exploited than non-ReDoS vulnerabilities. We further find that detection tools exhibit substantial disagreement on whether or not a given regex is vulnerable.

Keywords: ReDoS attack · Regex · security vulnerability.

1 Introduction

ReDoS vulnerabilities (for regex denial of service) are a category of vulnerabilities that may be present when a regex is used to validate the format of user-supplied input. In some cases, the regex validation process can take a supralinear amount of time based on the length of the input, leading to a denial-of-service.

Two conditions must be met for a ReDoS attack to be possible. First, the attack is only possible if the regex validation engine uses back-tracking[3]. Some regex validation libraries are immune to the attack, regardless of the regex pattern being matched. Secondly, the attack occurs if the regex exhibits one of several particular patterns, termed evil patterns.

If both conditions are met, and the regex is used to validate an input submitted by a malicious adversary, it can submit a specially crafted input whose validation by the regex takes exponential (or a large polynomial) time.

The literature on this topic is not in agreement regarding the exact definition of these patterns. The definition proposed by Li et al.[9] seems to be the most thorough. They identify 5 distinct evil patterns, three of which incur the

N. Mahassadi et al.

possibility of a supralinear evaluation time, and two others that risk large polynomial blow-ups. This classification is not universally accepted; consequently, some regex detection tools can recognize only a subset of vulnerable patterns.

Perhaps because of the uncertainty about which patterns are problematic, this category of attack is becoming more prevalent. Furthermore, for the same reason, the various tools that developers may rely on to determine if the regex they wish to use exhibits an evil pattern are often not in agreement.

In this study, we perform two experiments that shed light on this category of vulnerability, providing actionable information for developers and security professionals.

The contributions of this paper are as follows:

  1. We perform an empirical analysis of over 400 ReDoS CVEs, highlighting how they differ from CVEs that report on other classes of vulnerabilities.

  2. We evaluate the effectiveness of five ReDoS vulnerability detection tools and one ReDoS correction tool, using three datasets of regexes. Finding that ReDoS detection tools are often not in agreement, we propose a multi-factor metric for determining if a regex is vulnerable, and argue that our experimental results support the use of this metric.

  3. We make two datasets available to the software security community: first, a dataset of 490 ReDoS CVEs, which is useful for research purposes since ReDoS CVEs are often not labeled as such. Second, a labeled version of RegexLib dataset, indicating whether each regex is vulnerable or not according to the above-mentioned multi-factor metric.

The remainder of this paper is organized as follows: Section 2 surveys related works and provides additional background information about ReDoS vulnerabilities. Section 3 describes the datasets relied upon for this paper and provides an outline of our methodology. Section 4 shows the results of our analysis of ReDoS CVEs. Section 5 provides the results of our experiments with ReDoS detection tools. Concluding remarks are given in Section 6.