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

591 results · Feed

  • High 7.5

    Inefficient Regular Expression Complexity in node-email-check

    ReDos in NPMJS Node Email Check v.1.0.4 allows an attacker to cause a denial of service via a crafted string to the scpSyntax component.

  • Medium 4.6

    Inefficient Regular Expression Complexity in TorBot

    Torbot is an open source tor network intelligence tool. In affected versions the `torbot.modules.validators.validate_link function` uses the python-validators URL validation regex. This particular regular expression has an exponential complexity which allows …

  • High 7.5

    Zod denial of service vulnerability during email validation

    ### Impact API servers running `express-zod-api` having: - version of `express-zod-api` below `10.0.0-beta1`, - and using the following (or similar) validation schema in its implementation: `z.string().email()`, are vulnerable to a DoS attack due to: - Ineffi…

  • High 7.5

    Zod 3.22.2 - Regular expression Denial of Service

    Zod in versions 3.21.0 up to and including 3.22.3 allows an attacker to perform a denial of service while validating emails.

  • High 8.6
    CVE-2023-43646 Public exploit

    Inefficient Regular Expression Complexity in get-func-name

    get-func-name is a module to retrieve a function's name securely and consistently both in NodeJS and the browser. Versions prior to 2.0.1 are subject to a regular expression denial of service (redos) vulnerability which may lead to a denial of service when pa…

  • Medium 6.5

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab affecting all versions starting from 15.11 before 16.1.5, all versions starting from 16.2 before 16.2.5, all versions starting from 16.3 before 16.3.1. An authenticated user could trigger a denial of service when importi…

  • Medium 6.5

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab affecting all versions starting from 15.11 before 16.1.5, all versions starting from 16.2 before 16.2.5, all versions starting from 16.3 before 16.3.1. An authenticated user could trigger a denial of service when importi…

  • High 7.5

    MathJax Regular expression Denial of Service (ReDoS)

    Mathjax up to v2.7.9 was discovered to contain two Regular expression Denial of Service (ReDoS) vulnerabilities in MathJax.js via the components pattern and markdownPattern. NOTE: the vendor disputes this because the regular expressions are not applied to use…

  • High 7.5

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 9.3 before 16.0.8, all versions starting from 16.1 before 16.1.3, all versions starting from 16.2 before 16.2.2. A Regular Expression Denial of Service was possible via sending …

  • Medium 6.5

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab affecting all versions starting from 15.2 before 16.0.8, all versions starting from 16.1 before 16.1.3, all versions starting from 16.2 before 16.2.2. A Regular Expression Denial of Service was possible by using crafted …

  • High 7.5
    CVE-2023-3364 EPSS 44%

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 8.14 before 16.0.8, all versions starting from 16.1 before 16.1.3, all versions starting from 16.2 before 16.2.2. A Regular Expression Denial of Service was possible via sending…

  • Medium 4.3

    In JetBrains TeamCity before 2023.05.2 a ReDoS attack was possible via integration with issue trackers

  • High 7.5

    Inefficient Regular Expression Complexity in GitLab

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 10.3 before 15.11.10, all versions starting from 16.0 before 16.0.6, all versions starting from 16.1 before 16.1.1. A Regular Expression Denial of Service was possible via sendi…

  • Medium 6.5

    Apache Airflow: ReDoS via dags function

    Apache Airflow, versions before 2.6.3, has a vulnerability where an authenticated user can use crafted input to make the current request hang. It is recommended to upgrade to a version that is not affected

  • High 7.5

    Django has regular expression denial of service vulnerability in EmailValidator/URLValidator

    In Django 3.2 before 3.2.20, 4 before 4.1.10, and 4.2 before 4.2.3, EmailValidator and URLValidator are subject to a potential ReDoS (regular expression denial of service) attack via a very large number of domain name labels of emails and URLs.

  • Medium 5.3

    URI gem has ReDoS vulnerability

    A ReDoS issue was discovered in the URI component before 0.12.2 for Ruby. The URI parser mishandles invalid URLs that have specific characters. There is an increase in execution time for parsing strings to URI objects with rfc2396_parser.rb and rfc3986_parser…

  • Medium 5.3

    word-wrap vulnerable to Regular Expression Denial of Service

    All versions of the package word-wrap are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of an insecure regular expression within the result variable.

  • Medium 5.3

    semver vulnerable to Regular Expression Denial of Service

    Versions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

  • High 7.5

    The urlnorm crate through 0.1.4 for Rust allows Regular Expression Denial of Service (ReDos) via a crafted URL to lib.r…

  • Low —

    git-url-parse crate vulnerable to Regular Expression Denial of Service

    The git-url-parse crate through 0.4.4 for Rust allows Regular Expression Denial of Service (ReDos) via a crafted URL to normalize_url in lib.rs, a similar issue to CVE-2023-32758 (Python).

  • High 7.5

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 12.0 before 15.10.8, all versions sta…

  • High 7.5

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 8.7 before 15.10.8, all versions star…

  • High 7.5

    Regex Injection via Doctype Entities

    fast-xml-parser is an open source, pure javascript xml parser. fast-xml-parser allows special characters in entity names, which are not escaped or sanitized. Since the entity name is used for creating a regex for searching and replacing entities in the XML bo…

  • High 7.5
    CVE-2023-31606 Public exploit

    RedCloth Regular Expression Denial of Service issue

    A Regular Expression Denial of Service (ReDoS) issue was discovered in the sanitize_html function of redcloth gem v4.0.0. This vulnerability allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.

  • High 7.5

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 15.4 before 15.10.8, all versions sta…

  • Medium 6.5

    Liferay Portal has Inefficient Regular Expression

    Pattern Redirects in Liferay Portal 7.4.3.48 through 7.4.3.76, and Liferay DXP 7.4 update 48 through 76 allows regular expressions that are vulnerable to ReDoS attacks to be used as patterns, which allows remote attackers to consume an excessive amount of ser…

  • High 7.5

    git-url-parse Regular Expression Denial of Service

    giturlparse (aka git-url-parse) through 1.2.2, as used in Semgrep 1.5.2 through 1.24.1, is vulnerable to ReDoS (Regular Expression Denial of Service) if parsing untrusted URLs. This might be relevant if Semgrep is analyzing an untrusted package (for example, …

  • Medium 5.3

    Denosaurs emoji has ReDoS vulnerability in `replace` function

    The Denosaurs emoji package provides emojis for dinosaurs. Starting in version 0.1.0 and prior to version 0.3.0, the reTrimSpace regex has 2nd degree polynomial inefficiency, leading to a delayed response given a big payload. The issue has been patched in 0.3…

  • Medium 5.5

    Parser contains an inefficient regular expression in sqlparse

    sqlparse is a non-validating SQL parser module for Python. In affected versions the SQL parser contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). This issue was introduced by commit `e75e358`. The vulnerability m…

  • Medium 5.5
    CVE-2023-27704 Public exploit

    Void Tools Everything lower than v1.4.1.1022 was discovered to contain a Regular Expression Denial of Service (ReDoS).

  • Low 3.7

    configobj ReDoS exploitable by developer using values in a server-side configuration file

    All versions of the package configobj are vulnerable to Regular Expression Denial of Service (ReDoS) via the validate function, using (.+?)\((.*)\). **Note:** This is only exploitable in the case of a developer, putting the offending value in a server side co…

  • High 7.5

    Ruby Time component ReDoS issue

    A ReDoS issue was discovered in the Time component through 0.2.1 in Ruby through 3.2.1. The Time parser mishandles invalid URLs that have specific characters. It causes an increase in execution time for parsing strings to Time objects. The fixed versions are …

  • Medium 5.3

    Ruby URI component ReDoS issue

    A ReDoS issue was discovered in the URI component through 0.12.0 in Ruby through 3.2.1. The URI parser mishandles invalid URLs that have specific characters. It causes an increase in execution time for parsing strings to URI objects. The fixed versions are 0.…

  • Medium 5.3

    angular vulnerable to regular expression denial of service via the angular.copy() utility

    Versions of the package angular from 1.2.21 are vulnerable to Regular Expression Denial of Service (ReDoS) via the angular.copy() utility function due to the usage of an insecure regular expression. Exploiting this vulnerability is possible by a large careful…

  • Medium 5.3

    angular vulnerable to regular expression denial of service via the <input type="url"> element

    Versions of the package angular from 1.4.9 are vulnerable to Regular Expression Denial of Service (ReDoS) via the <input type="url"> element due to the usage of an insecure regular expression in the input[url] functionality. Exploiting this vulnerability is p…

  • Medium 5.3

    angular vulnerable to regular expression denial of service via the $resource service

    Versions of the package angular from 1.0.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the $resource service due to the usage of an insecure regular expression. Exploiting this vulnerability is possible by a large carefully-crafted inpu…

  • Medium 5.3

    Regular Expression Denial of Service in Deno.upgradeWebSocket API

    Versions of the package deno before 1.31.0 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the upgradeWebSocket function, which contains regexes in the form of /s*,s*/, used for splitting the Connection/Upgrade header. A specially crafte…

  • High 7.5

    Undici vulnerable to Regular Expression Denial of Service in Headers

    Undici is an HTTP/1.1 client for Node.js. Prior to version 5.19.1, the `Headers.set()` and `Headers.append()` methods are vulnerable to Regular Expression Denial of Service (ReDoS) attacks when untrusted values are passed into the functions. This is due to th…

  • High 7.5

    regular expression denial-of-service (ReDoS) in Bleach

    bleach.clean behavior parsing style attributes could result in a regular expression denial of service (ReDoS). Calls to bleach.clean with an allowed tag with an allowed style attribute are vulnerable to ReDoS. For example, bleach.clean(..., attributes={'a': […

  • Low 3.5

    Kong lua-multipart multipart.lua is_header redos

    A vulnerability was found in Kong lua-multipart 0.5.8-1. It has been declared as problematic. This vulnerability affects the function is_header of the file src/multipart.lua. The manipulation leads to inefficient regular expression complexity. Upgrading to ve…