Lune

S&P2021Top-tier venue

Revealer: Detecting and Exploiting Regular Expression Denial-of-Service Vulnerabilities

Yinxi Liu, Mingxue Zhang, Wei Meng

Abstract

Regular expression Denial-of-Service (ReDoS) is a class of algorithmic complexity attacks. Attackers can craft particular strings to trigger the worst-case super-linear matching time of some vulnerable regular expressions (regex) with extended features that are commonly supported by popular programming languages. ReDoS attacks can severely degrade the performance of web applications, which extensively employ regexes in their server-side logic. Nevertheless, the characteristics of vulnerable regexes with extended features remain understudied, making it difficult to mitigate or even detect such vulnerabilities. In this paper, we aim to model vulnerable regex patterns generated by popular regex engines and craft attack strings accordingly. Our characterization fully supports the analysis of regexes with any extended feature. We develop REVEALER to detect vulnerable structures presented in any given regex and generate attack strings to exploit the corresponding vulnerabilities. REVEALER takes a hybrid approach. It first statically locates potential vulnerable structures of a regex, then dynamically verifies whether the vulnerabilities can be triggered or not, and finally crafts attack strings that can lead to recursive backtracking. By combining both static analysis and dynamic analysis, REVEALER can accurately and efficiently generate exploits in a limited amount of time. It can further offer mitigation suggestions based on the structural information it identifies. We implemented a prototype of REVEALER for Java. We evaluated REVEALER over a dataset with 29,088 regexes, and compared it with three state-of-the-art tools. The evaluation shows that REVEALER considerably outperformed all the existing tools-REVEALER can detect all 237 vulnerabilities that can be detected by any other tool, find 213 new vulnerabilities, and beat the best tool by 140.64%. We further demonstrate that REVEALER successfully detected 45 vulnerable regexes in popular real-world applications. Our evaluation demonstrates that REVEALER is both effective and efficient in detecting and exploiting ReDoS vulnerabilities.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

21 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Repairing DoS Vulnerability of Real-World Regexes cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Linear Matching of JavaScript Regular Expressions cites Repairing DoS Vulnerability of Real-World Regexes
  • Linear Matching of JavaScript Regular Expressions cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Exploiting Input Sanitization for Regex Denial of Service cites A Sense of Time for JavaScript and Node.js: First-Class Timeouts as a Cure for Event Handler Poisoning
  • Exploiting Input Sanitization for Regex Denial of Service cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Exploiting Input Sanitization for Regex Denial of Service cites SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites A Sense of Time for JavaScript and Node.js: First-Class Timeouts as a Cure for Event Handler Poisoning
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • A Sense of Time for JavaScript and Node.js: First-Class Timeouts as a Cure for Event Handler Poisoning cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers cites SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers21

  1. SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel et al.ICSE 2023 · 20 citations
  2. Exploiting Input Sanitization for Regex Denial of ServiceEfe Barlas, Xin Du, James C. DavisICSE 2022 · 16 citations
  3. Repairing DoS Vulnerability of Real-World RegexesNariyoshi Chida, Tachio TerauchiS&P 2022 · 15 citations
  4. Linear Matching of JavaScript Regular ExpressionsAurèle Barrière, Clément Pit-ClaudelPLDI 2024 · 11 citations
  5. Artemis: Toward Accurate Detection of Server-Side Request Forgeries through LLM-Assisted Inter-procedural Path-Sensitive Taint AnalysisYuchen Ji, Ting Dai, Zhichao Zhou, Yutian Tang et al.OOPSLA 2025 · 9 citations

Builds on3

  1. SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 citations
  2. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 citations
  3. A Sense of Time for JavaScript and Node.js: First-Class Timeouts as a Cure for Event Handler PoisoningJames C. Davis, Eric R. Williamson, Dongyoon LeeUSENIX Security 2018 · 54 citations

Related papers

  1. 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
  2. Effective ReDoS Detection by Principled Vulnerability Modeling and Exploit GenerationXinyi Wang, Cen Zhang, Yeting Li, Zhiwu Xu et al.S&P 2023
  3. Towards an Effective Method of ReDoS Detection for Non-backtracking EnginesWeihao Su, Hong Huang, Rongchen Li, Haiming Chen et al.USENIX Security 2024 · 4 citations
  4. Regulator: Dynamic Analysis to Detect ReDoSRobert McLaughlin, Fabio Pagani, Noah Spahn, Christopher Kruegel et al.USENIX Security 2022
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines