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-600752026-07-30CVE-2026-162702026-07-22CVE-2026-494857.52026-07-17CVE-2026-527467.52026-07-17CVE-2026-147417.52026-07-17CVE-2026-622376.52026-07-17CVE-2026-453677.52026-07-16CVE-2026-494777.52026-07-14CVE-2026-488012026-07-14CVE-2026-481255.32026-07-14CVE-2026-453057.52026-07-14CVE-2026-451337.52026-07-14CVE-2026-457567.52026-07-14CVE-2026-68506.52026-07-13CVE-2026-575842026-07-10CVE-2026-592206.52026-07-09CVE-2026-554707.52026-07-08CVE-2026-151546.52026-07-08CVE-2026-599287.52026-07-08CVE-2026-599257.52026-07-08