Skip to content
OpenAdvisories

Weakness (CWE)

CWE-1333: Inefficient Regular Expression Complexity

Base Draft

The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

How to prevent it (4 mitigations)
  1. Architecture and Design

    Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.

  2. System Configuration

    Set 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.

  3. Implementation

    Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.

  4. Implementation

    Limit the length of the input that the regular expression will process.

Source: MITRE CWE-1333

7 results · Clear filters · Feed

  • Critical 9.6

    IBM API Connect Denial of Service

    IBM API Connect 10.0.8.0 through 10.0.8.12 and 12.1.0.0 through 12.1.1.2 are vulnerable to a Regular Expression Denial of Service (ReDoS) attack and to improper neutralisation of wildcard query operators.

  • Critical 10.0

    Apache OpenNLP, Apache OpenNLP: ReDoS / stack exhaustion in RegexNameFinderFactory built-in EMAIL and URL patterns

    The two built-in name-finder patterns exposed by opennlp.tools.namefind.RegexNameFinderFactory - DEFAULT_REGEX_NAME_FINDER.EMAIL and DEFAULT_REGEX_NAME_FINDER.URL - contain ambiguous nested quantifiers. An application that obtains these finders through RegexN…

  • Critical 9.8

    YesWiki has Unsafe eval() in Formula Calculator - Remote Code Execution (RCE) & Denial of Service (DoS)

    YesWiki is a wiki system written in PHP. Prior to version 4.6.6, an unsafe execution vulnerability exists in the Bazar form field calculator (CalcField.php) of YesWiki. The application attempts to sanitize user-defined mathematical formulas using a complex re…

  • Critical 9.2

    Uncontrolled Resource Consumption in @isaacs/brace-expansion

    @isaacs/brace-expansion is a hybrid CJS/ESM TypeScript fork of brace-expansion. Prior to version 5.0.1, @isaacs/brace-expansion is vulnerable to a denial of service (DoS) issue caused by unbounded brace range expansion. When an attacker provides a pattern con…

  • Critical 9.2
    CVE-2025-25200 Public exploit

    Koa has Inefficient Regular Expression Complexity

    Koa is expressive middleware for Node.js using ES2017 async functions. Prior to versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3, Koa uses an evil regex to parse the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP headers. This can be exploited to carry out …

  • Critical 9.8

    An issue was discovered in Heimdal Thor agent versions 3.4.2 and before 3.7.0 on Windows, allows attackers to bypass US…

  • Critical 9.8

    Prototype pollution vulnerability in 'predefine'

    Prototype pollution vulnerability in 'predefine' versions 0.0.0 through 0.1.2 allows an attacker to cause a denial of service and may lead to remote code execution.