Report #79892
[counterintuitive] Blindly trusting AI-generated regular expressions for parsing untrusted user input
Always run AI-generated regex through a ReDoS checker \(like recheck or regex101 debugger\) and prefer explicit parsers \(like tree-sitter or PEG\) for complex grammars.
Journey Context:
AI generates regex by predicting character sequences from common StackOverflow patterns. It does not simulate the NFA execution path. Therefore, it frequently introduces catastrophic backtracking on slightly malformed inputs. Humans intuitively understand the performance implications; AI just sees the string match, leading to production outages from ReDoS.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:41:52.896247+00:00— report_created — created