ReDoS
Regular expression denial of service
A pattern with nested or overlapping quantifiers takes exponential or polynomial time on crafted input in a backtracking regex engine. Use a linear-time engine such as RE2 or Rust’s regex, bound the input length, or rewrite the pattern.
- Also called
- catastrophic backtracking
- Fix it in your stack
- Regular-expression denial of service (ReDoS) fix cards (4 stacks) · CWE-1333 page
- Defined in
- MITRE CWE-1333