Lune

S&P2021顶会

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

Yinxi Liu, Mingxue Zhang, Wei Meng

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 21 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Repairing DoS Vulnerability of Real-World Regexes 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Linear Matching of JavaScript Regular Expressions 引用了 Repairing DoS Vulnerability of Real-World Regexes
  • Linear Matching of JavaScript Regular Expressions 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Exploiting Input Sanitization for Regex Denial of Service 引用了 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 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Exploiting Input Sanitization for Regex Denial of Service 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 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 引用了 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 引用了 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 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper21

  1. SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel 等ICSE 2023 · 20 次引用
  2. Exploiting Input Sanitization for Regex Denial of ServiceEfe Barlas, Xin Du, James C. DavisICSE 2022 · 16 次引用
  3. Repairing DoS Vulnerability of Real-World RegexesNariyoshi Chida, Tachio TerauchiS&P 2022 · 15 次引用
  4. Linear Matching of JavaScript Regular ExpressionsAurèle Barrière, Clément Pit-ClaudelPLDI 2024 · 11 次引用
  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 等OOPSLA 2025 · 9 次引用

它引用的 Paper3

  1. SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 次引用
  2. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 次引用
  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 次引用

相关 Paper

  1. ReDoSHunter: A Combined Static and Dynamic Approach for Regular Expression DoS DetectionYeting Li, Zixuan Chen, Jialun Cao, Zhiwu Xu 等USENIX Security 2021 · 20 次引用
  2. Effective ReDoS Detection by Principled Vulnerability Modeling and Exploit GenerationXinyi Wang, Cen Zhang, Yeting Li, Zhiwu Xu 等S&P 2023
  3. Towards an Effective Method of ReDoS Detection for Non-backtracking EnginesWeihao Su, Hong Huang, Rongchen Li, Haiming Chen 等USENIX Security 2024 · 4 次引用
  4. Regulator: Dynamic Analysis to Detect ReDoSRobert McLaughlin, Fabio Pagani, Noah Spahn, Christopher Kruegel 等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 等S&P 2026
黄昏的海面,两侧是细线勾勒的悬崖