Web Security · Senior · Question 60 of 75
What is ReDoS?
/^(a+)+$/.test(input)- ✓Correct answer: A regex with catastrophic backtracking takes exponential time on crafted input and blocks the event loop
- 2A redirect loop caused by regular expressions
- 3A regex that matches too many strings
Explanation
In Node.js one slow regex freezes the whole process. Avoid nested quantifiers, limit input length, or use a linear-time regex engine.