EncryptCodecencryptcodec
Simulations/ReDoS

ReDoS (Regular Expression Denial of Service)

Intermediate

Certain regex patterns with nested quantifiers cause exponential backtracking. Craft an evil input string that makes the regex engine hang, then rewrite the pattern safely.

Progress:
1
Trigger Catastrophic Backtracking
2
Write a Safe Pattern
Regex Tester
Backtracking Analysis
Enter a test input and click Test to analyze backtracking...

Challenges

1
Trigger Catastrophic Backtracking
Submit a string that causes the regex ^(a+)+$ to take exponential time.
hints
2
Write a Safe Pattern
Rewrite the regex to match the same strings without catastrophic backtracking.
hints
How to fix ReDoS vulnerabilities
Rewrite patterns, use atomic groups, and set timeouts

Frequently Asked Questions