CWE•Base•Draft•20 recent CVEs
CWE-1333Inefficient Regular Expression Complexity
Description
The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
Common consequences
- Availability→DoS: Resource Consumption (CPU)Attackers can create crafted inputs that intentionally cause the regular expression to use excessive backtracking in a way that causes the CPU consumption to spike.
Potential mitigations
- Architecture and DesignUse regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
- System ConfigurationSet backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.
- ImplementationDo not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.
- ImplementationLimit the length of the input that the regular expression will process.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-1186867.52026-10-28CVE-2026-1186466.52026-10-28CVE-2026-1182595.32026-10-28CVE-2026-1175002026-10-28CVE-2026-1167957.52026-10-28CVE-2026-1162852026-10-28CVE-2026-1162682026-10-28CVE-2026-1180377.52026-10-28CVE-2026-1166932026-10-27CVE-2026-1165882026-10-26CVE-2026-1158222026-10-25CVE-2026-1158877.52026-10-23CVE-2026-1157287.52026-10-23CVE-2026-1155086.52026-10-22CVE-2026-1153497.52026-10-22CVE-2026-1146035.32026-10-22CVE-2026-1129017.52026-10-19CVE-2026-1123005.32026-10-19CVE-2026-1123667.52026-10-19CVE-2026-1119972026-10-18