English

Regular Expression Denial of Service Induced by Backreferences

Cryptography and Security 2026-02-26 v1 Formal Languages and Automata Theory

Abstract

This paper presents the first systematic study of denial-of-service vulnerabilities in Regular Expressions with Backreferences (REwB). We introduce the Two-Phase Memory Automaton (2PMFA), an automaton model that precisely captures REwB semantics. Using this model, we derive necessary conditions under which backreferences induce super-linear backtracking runtime, even when sink ambiguity is linear -- a regime where existing detectors report no vulnerability. Based on these conditions, we identify three vulnerability patterns, develop detection and attack-construction algorithms, and validate them in practice. Using the Snort intrusion detection ruleset, our evaluation identifies 45 previously unknown REwB vulnerabilities with quadratic or worse runtime. We further demonstrate practical exploits against Snort, including slowing rule evaluation by 0.6-1.2 seconds and bypassing alerts by triggering PCRE's matching limit.

Keywords

Cite

@article{arxiv.2602.21459,
  title  = {Regular Expression Denial of Service Induced by Backreferences},
  author = {Yichen Liu and Berk Çakar and Aman Agrawal and Minseok Seo and James C. Davis and Dongyoon Lee},
  journal= {arXiv preprint arXiv:2602.21459},
  year   = {2026}
}

Comments

24 pages, 8 figures. Submitted to USENIX Security 2026. For the code repository of detector, see https://anonymous.4open.science/r/slmad-EABE. For the code repository of measurements, see https://anonymous.4open.science/r/atkre-7D50

R2 v1 2026-07-01T10:50:54.226Z