Regular Expression Denial of Service Induced by Backreferences
Fuente:
arXiv
Gespeichert in:
| Hauptverfasser: | , , , , , |
|---|---|
| Format: | Preprint |
| Veröffentlicht: |
2026
|
| Schlagworte: | |
| Online-Zugang: | |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| _version_ | 1866914350067875840 |
|---|---|
| author | Liu, Yichen Çakar, Berk Agrawal, Aman Seo, Minseok Davis, James C. Lee, Dongyoon |
| author_facet | Liu, Yichen Çakar, Berk Agrawal, Aman Seo, Minseok Davis, James C. Lee, Dongyoon |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2602_21459 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Regular Expression Denial of Service Induced by Backreferences Liu, Yichen Çakar, Berk Agrawal, Aman Seo, Minseok Davis, James C. Lee, Dongyoon Cryptography and Security Formal Languages and Automata Theory 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. |
| title | Regular Expression Denial of Service Induced by Backreferences |
| topic | Cryptography and Security Formal Languages and Automata Theory |
| url | https://arxiv.org/abs/2602.21459 |