← Lab /Software

Backreferences cause quadratic regex DoS, exposing 45 new Snort rule vulnerabilities

Backreferences can induce super-linear backtracking runtime leading to denial-of-service attacks

Software arXiv 25 Feb 2026 Measurement Real-world evidence

Published as “Regular Expression Denial of Service Induced by Backreferences”

Why it matters

Security-critical deployments that rely on regexes with backreferences (e.g., IDS, WAFs) may be vulnerable to denial-of-service attacks that current tools cannot detect, urging immediate audit using the proposed patterns.

Summary

The authors discovered 45 previously unknown regular-expression-with-backreference (REwB) vulnerabilities in the Snort intrusion-detection ruleset that exhibit quadratic or worse runtime and can slow rule evaluation by 0.6-1.2 seconds. They introduced the Two-Phase Memory Finite Automaton (2PMFA) to model REwB semantics and derived necessary conditions and three vulnerability patterns for super-linear backtracking. Their detection framework, built on these patterns, found the vulnerabilities and enabled concrete exploits against Snort, though the excerpt provides limited details on the full evaluation methodology and results.

What they found 3

  1. 45 previously unknown REwB vulnerabilities with quadratic or worse runtime were identified in Snort rules.

    “Using the Snort intrusion detection ruleset, our evaluation identifies 45 previously unknown REwB vulnerabilities with quadratic or worse runtime.”

  2. Exploits can slow Snort rule evaluation by 0.6-1.2 seconds.

    “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.”

  3. Backreferences introduce a distinct source of super-linear runtime that NFA-based detectors miss.

    “Our study is the first to systematically analyze ReDoS vulnerabilities induced by backreferences. The findings reveal that backreferences introduce a fundamentally distinct source of super-linear runtime that existing NFA-based detectors cannot capture: a single loop interacting with a backreference suffices to cause super-linear behavior.”

What’s new here 4

  • Introduces the Two-Phase Memory Finite Automaton (2PMFA) that captures backreference semantics, unlike prior NFA-based models.
  • Derives necessary conditions and three specific REwB patterns that cause super-linear backtracking, which were previously undocumented.
  • Provides a detection algorithm and attack-automaton generator for REwB-induced ReDoS, detecting vulnerabilities missed by existing tools.
  • Demonstrates real-world exploits against Snort, showing measurable slowdowns and alert bypasses.