由反向引用引发的正则表达式拒绝服务攻击 Regular Expression Denial of Service Induced by Backreferences 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-02-25
⬇️ 4 次下载
👁️ 预览文献
💡 AI 中文简介
本文首次系统研究带反向引用的正则表达式(REwB)中的拒绝服务漏洞。作者提出两阶段记忆自动机(2PMFA)模型,精确刻画REwB语义,并推导出反向引用导致超线性回溯运行时的必要条件,即使汇点歧义为线性时也能触发。基于此,他们识别出三种漏洞模式,开发检测与攻击构造算法,并在Snort规则集中发现45个未知漏洞,可导致规则评估变慢0.6-1.2秒或绕过告警。
领域网络安全 / 程序分析与漏洞检测
适合谁读需要一定专业背景(熟悉正则表达式、自动机或网络安全)
核心贡献1. 提出2PMFA自动机模型,首次精确刻画REwB语义;2. 推导出反向引用导致超线性回溯的必要条件,并发现三种漏洞模式,开发检测与攻击构造算法。
关键数据在Snort规则集中发现45个未知REwB漏洞,导致二次或更差运行时;实际利用可使规则评估变慢0.6-1.2秒,或触发PCRE匹配限制绕过告警。
推荐理由如果你关心正则表达式安全或入侵检测系统,这篇论文揭示了反向引用这一常见特性如何被忽视并引发严重DoS漏洞,实用性强。
关键词["正则表达式", "拒绝服务", "反向引用", "自动机理论", "漏洞检测", "Snort"]

原文摘要

查看英文原文摘要

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.