Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix Strategies
Sk Adnan Hassan, Zainab Aamir, Dongyoon Lee, James C. Davis, and Francisco Servant

TL;DR
This paper introduces novel anti-patterns and fix strategies for vulnerable regexes, significantly improving detection, fixing, and developer understanding of ReDoS vulnerabilities through a new theory of regex ambiguity.
Contribution
It presents a new theory of regex infinite ambiguity, along with anti-patterns and fix strategies, enhancing the effectiveness and usability of ReDoS detection and fixing tools.
Findings
Anti-patterns achieved 100% precision and 99% recall on large dataset
Manual application of anti-patterns was twice as effective as previous methods
Developer understanding improved from very weak to strong with anti-patterns and fix strategies
Abstract
Regular expressions are used for diverse purposes, including input validation and firewalls. Unfortunately, they can also lead to a security vulnerability called ReDoS (Regular Expression Denial of Service), caused by a super-linear worst-case execution time during regex matching. Due to the severity and prevalence of ReDoS, past work proposed automatic tools to detect and fix regexes. Although these tools were evaluated in automatic experiments, their usability has not yet been studied; usability has not been a focus of prior work. Our insight is that the usability of existing tools to detect and fix regexes will improve if we complement them with anti-patterns and fix strategies of vulnerable regexes. We developed novel anti-patterns for vulnerable regexes, and a collection of fix strategies to fix them. We derived our anti-patterns and fix strategies from a novel theory of regex…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Application Security Vulnerabilities · Information and Cyber Security · Software Engineering Research
