vetkit.csharp.redos.tainted-pattern
A regular expression pattern is built from request input and evaluated without a match timeout. A crafted pattern can backtrack catastrophically and exhaust CPU (ReDoS), or change what the expression matches.
Last updated:
Suite: Security
csharp
A regular expression pattern is built from request input and evaluated without a match timeout. A crafted pattern can backtrack catastrophically and exhaust CPU (ReDoS), or change what the expression matches.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Escape user text with Regex.Escape, pass a matchTimeout, or use RegexOptions.NonBacktracking (.NET 7+).
References
Source: packages/engine/rules/sast/csharp.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.