USENIX Security2024Top-tier venue
Towards an Effective Method of ReDoS Detection for Non-backtracking Engines
Weihao Su, Hong Huang, Rongchen Li, Haiming Chen, Tingjian Ge
Abstract
Regular expressions (regexes) are a fundamental concept across the fields of computer science. However, they can also induce the Regular expression Denial of Service (Re-DoS) attacks, which are a class of denial of service attacks, caused by super-linear worst-case matching time. Due to the severity and prevalence of ReDoS attacks, the detection of ReDoS-vulnerable regexes in software is thus vital. Although various ReDoS detection approaches have been proposed, these methods have focused mainly on backtracking regex engines, leaving the problem of ReDoS vulnerability detection on non-backtracking regex engines largely open. To address the above challenges, in this paper, we first systematically analyze the major causes that could contribute to ReDoS vulnerabilities on non-backtracking regex engines. We then propose a novel type of ReDoS attack strings that builds on the concept of simple strings. Next we propose EVILSTRGEN, a tool for generating attack strings for ReDoSvulnerable regexes on non-backtracking engines. It is based on a novel incremental determinisation algorithm with heuristic strategies to lazily find the k-simple strings without explicit construction of finite automata. We evaluate EVILSTRGEN against six state-of-the-art approaches on a broad range of publicly available datasets containing 736,535 unique regexes. The results illustrate the significant efficacy of our tool. We also apply our tool to 85 intensively-tested projects, and have identified 34 unrevealed ReDoS vulnerabilities.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers4
- Towards Efficient Matching of Regexes with Backreferences using Register Set AutomataVojtech Havlena, Lukás Holík, Ondrej Lengál, Jan Vasák et al.PLDI 2026
- Autonomy Comes with Costs: Detecting Denial-of-Service Vulnerabilities Caused by Resource Abusing in LLM-based AgentsJiaqi Luo, Jiarun Dai, Fengyu Liu, Songyang Peng et al.USENIX Security 2026
- PufferDoS: Efficient and Effective Attack String Generation for Regular Expression Denial of Service VulnerabilitiesShangzhi Xu, Ziqi Ding, Xiao Cheng, Yuekang Li et al.S&P 2026
- Exploring Motif-based Heterogeneous Graph Learning for ReDoS DetectionHong Huang, Chengyu Yao, Rongchen Li, Weihao Su et al.ICML 2026
Builds on10
- Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 citations
- Revealer: Detecting and Exploiting Regular Expression Denial-of-Service VulnerabilitiesYinxi Liu, Mingxue Zhang, Wei MengS&P 2021 · 28 citations
- Regular Expression Matching using Bit Vector AutomataAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2023 · 22 citations
- Derivative Based Nonbacktracking Real-World Regex Matching with Backtracking SemanticsDan Moseley, Mario Nishio, Jose Perez Rodriguez, Olli Saarikivi et al.PLDI 2023 · 21 citations
- ReDoSHunter: A Combined Static and Dynamic Approach for Regular Expression DoS DetectionYeting Li, Zixuan Chen, Jialun Cao, Zhiwu Xu et al.USENIX Security 2021 · 20 citations
Related papers
- Regulator: Dynamic Analysis to Detect ReDoSRobert McLaughlin, Fabio Pagani, Noah Spahn, Christopher Kruegel et al.USENIX Security 2022
- Effective ReDoS Detection by Principled Vulnerability Modeling and Exploit GenerationXinyi Wang, Cen Zhang, Yeting Li, Zhiwu Xu et al.S&P 2023
- Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix StrategiesSk Adnan Hassan, Zainab Aamir, Dongyoon Lee, James C. Davis et al.S&P 2023
- Counting in Regexes Considered Harmful: Exposing ReDoS Vulnerability of Nonbacktracking MatchersLenka Turonová, Lukás Holík, Ivan Homoliak, Ondrej Lengál et al.USENIX Security 2022
- FlashRegex: Deducing Anti-ReDoS Regexes from ExamplesYeting Li, Zhiwu Xu, Jialun Cao, Haiming Chen et al.ASE 2020 · 17 citations
