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

275 results · Clear filters · Feed

  • 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…

  • 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, …

  • 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 …

  • 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': […

  • High 7.5

    ReDoS based DoS vulnerability in Action Dispatch

    A regular expression based DoS vulnerability in Action Dispatch <6.0.6.1,< 6.1.7.1, and <7.0.4.1. Specially crafted cookies, in combination with a specially crafted X_FORWARDED_HOST header can cause the regular expression engine to enter a state of catastroph…

  • High 7.5

    Denial of service via header parsing in Rack

    A denial of service vulnerability in the Range header parsing component of Rack >= 1.5.0. A Carefully crafted input can cause the Range header parsing component in Rack to take an unexpected amount of time, possibly resulting in a denial of service attack vec…

  • High 8.6

    Switcher Client contains Regular Expression Denial of Service (ReDoS)

    Switcher Client is a JavaScript SDK to work with Switcher API which is cloud-based Feature Flag. Unsanitized input flows into Strategy match operation (EXIST), where it is used to build a regular expression. This may result in a Regular expression Denial of S…

  • High 8.6

    Discourse vulnerable to ReDoS in user agent parsing

    Discourse is an open-source discussion platform. Prior to version 3.0.1 on the `stable` branch and version 3.1.0.beta2 on the `beta` and `tests-passed` branches, a malicious user can cause a regular expression denial of service using a carefully crafted user …

  • High 7.5

    The HTML-StripScripts module through 1.06 for Perl allows _hss_attval_style ReDoS because of catastrophic backtracking …

  • High 7.5
    CVE-2021-32837 EPSS 29%

    mechanize vulnerable to ReDoS

    mechanize, a library for automatically interacting with HTTP web servers, contains a regular expression that is vulnerable to regular expression denial of service (ReDoS) prior to version 0.4.6. If a web server responds in a malicious way, then mechanize coul…

  • High 7.5

    luxon.js inefficient regular expression complexity vulnerability

    Luxon is a library for working with dates and times in JavaScript. On the 1.x branch prior to 1.38.1, the 2.x branch prior to 2.5.2, and the 3.x branch on 3.2.1, Luxon's `DateTime.fromRFC2822() has quadratic (N^2) complexity on some specific inputs. This caus…

  • High 7.5

    glob-parent 6.0.0 vulnerable to Regular Expression Denial of Service

    The glob-parent package before 6.0.1 for Node.js allows ReDoS (regular expression denial of service) attacks against the enclosure regular expression.

  • High 7.5

    is_js vulnerable to Regular Expression Denial of Service

    is.js is a general-purpose check library. Versions 0.9.0 and prior contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS). is.js uses a regex copy-pasted from a gist to validate URLs. Trying to validate a m…

  • High 7.5

    pypa/wheel vulnerable to Regular Expression denial of service (ReDoS)

    An issue discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlier allows remote attackers to cause a denial of service via attacker controlled input to wheel cli.

  • High 7.5

    Inefficient Regular Expression Complexity in rails-html-sanitizer

    rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Certain configurations of rails-html-sanitizer < 1.4.4 use an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize cer…

  • High 7.5

    Inefficient Regular Expression Complexity in Loofah

    Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah < 2.19.1 contains an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize cert…

  • High 7.5

    Denial of Service Vulnerability in Rack Multipart Parsing

    A possible denial of service vulnerability exists in Rack <2.0.9.1, <2.1.4.1 and <2.2.3.1 in the multipart parsing component of Rack.

  • High 7.5

    Inefficient Regular Expression Complexity in Liferay Portal

    ReDoS vulnerability in LayoutPageTemplateEntryUpgradeProcess in Liferay Portal 7.3.2 through 7.4.3.4 and Liferay DXP 7.2 fix pack 9 through fix pack 18, 7.3 before update 4, and DXP 7.4 GA allows remote attackers to consume an excessive amount of server resou…

  • High 7.5

    kangax html-minifier REDoS vulnerability

    A Regular Expression Denial of Service (ReDoS) flaw was found in kangax html-minifier 4.0.0 because of the reCustomIgnore regular expression.

  • High 7.5

    minimatch ReDoS vulnerability

    A vulnerability was found in the minimatch package. This flaw allows a Regular Expression Denial of Service (ReDoS) when calling the braceExpand function with specific arguments, resulting in a Denial of Service.

  • High 7.5

    Django denial-of-service vulnerability in internationalized URLs

    In Django 3.2 before 3.2.16, 4.0 before 4.0.8, and 4.1 before 4.1.2, internationalized URLs were subject to a potential denial of service attack via the locale parameter, which is treated as a regular expression.

  • High 7.5

    loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) via url variable

    A Regular expression denial of service (ReDoS) flaw was found in Function interpolateName in interpolateName.js in webpack loader-utils 2.0.0 via the url variable in interpolateName.js.

  • High 7.5

    loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS)

    A Regular expression denial of service (ReDoS) flaw was found in Function interpolateName in interpolateName.js in webpack loader-utils 2.0.0 via the resourcePath variable in interpolateName.js.

  • High —

    d3-color vulnerable to ReDoS

    The d3-color module provides representations for various color spaces in the browser. Versions prior to 3.1.0 are vulnerable to a Regular expression Denial of Service. This issue has been patched in version 3.1.0. There are no known workarounds.

  • High 7.5

    steal Inefficient Regular Expression Complexity vulnerability via string variable

    A Regular Expression Denial of Service (ReDoS) flaw was found in stealjs steal 2.2.4 via the string variable in babel.js.

  • High 7.5

    steal vulnerable to Regular Expression Denial of Service via input variable

    A Regular Expression Denial of Service (ReDoS) flaw was found in stealjs steal 2.2.4 via the input variable in main.js.

  • High 7.5

    steal vulnerable to Regular Expression Denial of Service via source and sourceWithComments

    A Regular Expression Denial of Service (ReDoS) flaw was found in stealjs steal 2.2.4 via the source and sourceWithComments variable in main.js.

  • High 7.5

    mako is vulnerable to Regular Expression Denial of Service

    Sqlalchemy mako before 1.2.2 is vulnerable to Regular expression Denial of Service when using the Lexer class to parse. This also affects babelplugin and linguaplugin.

  • High 7.5

    Possible Regular Expression Denial of Service (ReDoS) used on uncontrolled data in nitrado.js

    nitrado.js is a type safe wrapper for the Nitrado API. Possible ReDoS with lib input of `{{` and with many repetitions of `{{|`. This issue has been patched in all versions above `0.2.5`. There are currently no known workarounds.

  • High 7.5

    Inefficient Regular Expression Complexity in v8n

    v8n is a javascript validation library. Versions of v8n prior to 1.5.1 were found to have an inefficient regular expression complexity in the `lowercase()` and `uppercase()` regex which could lead to a denial of service attack. In testing of the `lowercase()`…

  • High 8.6

    Mistune vulnerable to catastrophic backtracking

    In mistune through 2.0.2, support of inline markup is implemented by using regular expressions that can involve a high amount of backtracking on certain edge cases. This behavior is commonly named catastrophic backtracking.

  • High 7.5
    CVE-2022-31147 Public exploit

    jquery-validation ReDoS in url2 due to incomplete fix of CVE-2021-43306

    The jQuery Validation Plugin (jquery-validation) provides drop-in validation for forms. Versions of jquery-validation prior to 1.19.5 are vulnerable to regular expression denial of service (ReDoS) when an attacker is able to supply arbitrary input to the url2…

  • High 7.5

    Regular Expression Denial of Service (ReDoS) in ContentType.java. (GHSL-2022-022)

    Apache Tapestry up to version 5.8.1 is vulnerable to Regular Expression Denial of Service (ReDoS) in the way it handles Content Types. Specially crafted Content Types may cause catastrophic backtracking, taking exponential time to complete. Specifically, this…

  • High 7.5

    Inefficient Regular Expression Complexity in moment

    moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. Affected versions of moment were found to use an inefficient parsing algorithm. Specifically using string-to-date parsing in moment (more specifically rfc2822 par…

  • High 7.5

    Regular expression denial of service in Delight Nashorn Sandbox

    An issue was discovered in Delight Nashorn Sandbox 0.2.0. There is an ReDoS vulnerability that can be exploited to launching a denial of service (DoS) attack.

  • High 7.5

    Apache ShenYu (incubating) Regular expression denial of service

    In Apache ShenYui, ShenYu-Bootstrap, RegexPredicateJudge.java uses Pattern.matches(conditionData.getParamValue(), realData) to make judgments, where both parameters are controllable by the user. This can cause an attacker pass in malicious regular expressions…

  • High 7.4

    ReDoS vulnerability in header parsing in hawk

    Hawk is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, and optionally the request payload. Hawk used a…

  • High 7.5

    Inefficient Regular Expression Complexity in Nokogiri

    Nokogiri is an open source XML and HTML library for Ruby. Nokogiri `< v1.13.4` contains an inefficient regular expression that is susceptible to excessive backtracking when attempting to detect encoding in HTML documents. Users are advised to upgrade to Nokog…

  • High 7.5

    Apache DolphinScheduler user registration is vulnerable to ReDoS attacks

    Apache DolphinScheduler user registration is vulnerable to Regular express Denial of Service (ReDoS) attacks, Apache DolphinScheduler users should upgrade to version 2.0.5 or higher.