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

259 results · Clear filters · Feed

  • Medium 5.3

    Uncontrolled Resource Consumption in markdown-it

    markdown-it is a Markdown parser. Prior to version 1.3.2, special patterns with length greater than 50 thousand characterss could slow down the parser significantly. Users should upgrade to version 12.3.2 to receive a patch. There are no known workarounds asi…

  • Medium 5.3

    Insufficient patch for Regular Expression Denial of Service (ReDoS) to jsx-slack v4.5.1

    jsx-slack is a package for building JSON objects for Slack block kit surfaces from JSX. The maintainers found the patch for CVE-2021-43838 in jsx-slack v4.5.1 is insufficient tfor protection from a Regular Expression Denial of Service (ReDoS) attack. If an at…

  • Medium 5.3

    Regular Expression Denial of Service (ReDoS) in jsx-slack

    jsx-slack is a library for building JSON objects for Slack Block Kit surfaces from JSX. In versions prior to 4.5.1 users are vulnerable to a regular expression denial-of-service (ReDoS) attack. If attacker can put a lot of JSX elements into `<blockquote>` tag…

  • Medium 5.3

    Inefficient Regular Expression Complexity in Validator.js

    ### Impact Versions of `validator` prior to 13.7.0 are affected by an inefficient Regular Expression complexity when using the `rtrim` and `trim` sanitizers. ### Patches The problem has been patched in validator 13.7.0

  • Medium 5.3

    Inefficient Regular Expression Complexity in validatorjs/validator.js

    validator.js is vulnerable to Inefficient Regular Expression Complexity

  • Medium 4.3

    Regular expression denial-of-service in Zulip

    Zulip is an open source team chat server. In affected versions Zulip allows organization administrators on a server to configure "linkifiers" that automatically create links from messages that users send, detected via arbitrary regular expressions. Malicious …

  • Medium 5.3

    Inefficient Regular Expression Complexity in josdejong/jsoneditor

    jsoneditor is vulnerable to Inefficient Regular Expression Complexity

  • Medium 5.3

    Inefficient Regular Expression Complexity in pksunkara/inflect

    inflect is vulnerable to Inefficient Regular Expression Complexity

  • Medium —

    Regular Expression Denial of Service in millisecond

    Versions of `millisecond` prior to 0.1.2 are affected by a regular expression denial of service vulnerability when extremely long version strings are parsed. ## Proof of concept ``` var ms = require('millisecond'); var genstr = function (len, chr) { var resul…

  • Medium 5.3

    Regular Expression Denial of Service (ReDoS)

    The package browserslist from 4.0.0 and before 4.16.5 are vulnerable to Regular Expression Denial of Service (ReDoS) during parsing of queries.

  • Medium 5.3

    Denial of Service in uap-core

    uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. In uap-core before version 0.11.0, some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture group…

  • Medium 5.3

    Regular Expression Denial of Service (ReDoS)

    Lodash versions prior to 4.17.21 are vulnerable to Regular Expression Denial of Service (ReDoS) via the toNumber, trim and trimEnd functions.

  • Medium 6.5

    CKEditor 4 ReDoS Vulnerability

    It was possible to execute a ReDoS-type attack inside CKEditor 4 before 4.16 by persuading a victim to paste crafted text into the Styles input of specific dialogs (in the Advanced Tab for Dialogs plugin).

  • Medium 5.7

    Denial of Service in uap-core when processing crafted User-Agent strings

    uap-core before 0.7.3 is vulnerable to a denial of service attack when processing crafted User-Agent strings. Some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups. This allows remote attackers to overlo…

  • Medium 6.5

    Inefficient Regular Expression Complexity in Jenkins Build Failure Analyzer Plugin

    A user-supplied regular expression in Jenkins Build Failure Analyzer Plugin 1.24.1 and earlier was processed in a way that wasn't interruptible, allowing attackers to have Jenkins evaluate a regular expression without the ability to interrupt this process.

  • Medium 5.3

    ReDoS via long string of semicolons in tough-cookie

    NodeJS Tough-Cookie version 2.2.2 contains a Regular Expression Parsing vulnerability in HTTP request Cookie Header parsing that can result in Denial of Service. This attack appear to be exploitable via Custom HTTP header passed by client. This vulnerability …

  • Medium 5.5

    Denial of Service in protobufjs

    protobufjs is vulnerable to ReDoS when parsing crafted invalid .proto files.

  • Medium 6.5

    Regular Expression Denial Of Service in uri-js

    uri-js is a module that tries to fully implement RFC 3986. One of these features is validating whether or not a supplied URL is valid or not. To do this, uri-js uses a regular expression, This regular expression is vulnerable to redos. This causes the program…

  • Medium —

    Spring Framework Inefficient Regular Expression Complexity

    Algorithmic complexity vulnerability in the java.util.regex.Pattern.compile method in Sun Java Development Kit (JDK) before 1.6, when used with spring.jar in SpringSource Spring Framework 1.1.0 through 2.5.6 and 3.0.0.M1 through 3.0.0.M2 and dm Server 1.0.0 t…