CWEweakness
CWE-1333 Inefficient Regular Expression Complexity
High
Official page ↗
- Alternate terms
- ReDoS, Regular Expression Denial of Service, Catastrophic backtracking
- Abstraction
- Base
- Structure
- Simple
- Status
- Draft
- Likelihood of exploit
- High
- Languages
- Go, Not Language-Specific
- CWE version
- 5.0
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 Design] Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
• [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.
• [Implementation] Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.
• [Implementation] Limit the length of the input that the regular expression will process.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Observed examples
• CVE-2020-5243: server allows ReDOS with crafted User-Agent strings, due to overlapping capture groups that cause excessive backtracking.
• CVE-2021-21317: npm package for user-agent parser prone to ReDoS due to overlapping capture groups
• CVE-2019-16215: Markdown parser uses inefficient regex when processing a message, allowing users to cause CPU consumption and delay preventing processing of other messages.
• CVE-2019-6785: Long string in a version control product allows DoS due to an inefficient regex.
• CVE-2019-12041: Javascript code allows ReDoS via a long string due to excessive backtracking.
• CVE-2015-8315: ReDoS when parsing time.
• CVE-2015-8854: ReDoS when parsing documents.
• CVE-2017-16021: ReDoS when validating URL.
Related
Attack pattern · CAPEC (1)
- CAPEC-492 Regular Expression Exponential Blowup attack pattern
Observed example · CVE (8)
- CVE-2021-21317 uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. vulnerability
- CVE-2020-5243 uap-core before 0.7.3 is vulnerable to a denial of service attack when processing crafted User-Agent strings. vulnerability
- CVE-2019-16215 The Markdown parser in Zulip server before 2.0.5 used a regular expression vulnerable to exponential backtracking. vulnerability
- CVE-2019-6785 An issue was discovered in GitLab Community and Enterprise Edition before 11.5.8, 11.6.x before 11.6.6, and 11.7.x before 11.7.1. vulnerability
- CVE-2019-12041 lib/common/html_re.js in remarkable 1.7.1 allows Regular Expression Denial of Service (ReDoS) via a CDATA section. vulnerability
- CVE-2017-16021 uri-js is a module that tries to fully implement RFC 3986. vulnerability
- CVE-2015-8315 The ms package before 0.7.1 for Node.js allows attackers to cause a denial of service (CPU consumption) via a long version string, aka a… vulnerability
- CVE-2015-8854 The marked package before 0.3.4 for Node.js allows attackers to cause a denial of service (CPU consumption) via unspecified vectors that… vulnerability
Child of · CWE (1)
- CWE-407 Inefficient Algorithmic Complexity weakness
Referenced by CAPEC · weakness (1)
- CAPEC-492 Regular Expression Exponential Blowup attack pattern
Referenced by CVE · weakness (563)
- CVE-2026-116268 MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters. vulnerability
- CVE-2026-116285 HTTP::Body versions before 1.23_01 for Perl allow CPU exhaustion via quadratic regex backtracking when parsing chunked request bodies. vulnerability
- CVE-2026-116795 RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching. vulnerability
- CVE-2026-117500 HTTP::Body versions before 1.24_01 for Perl allow CPU exhaustion via regex backtracking on the filename of a multipart upload. vulnerability
- CVE-2026-118037 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, infinite loop, unchecked loop… vulnerability
- CVE-2026-118259 opentelemetry-java is the Java implementation of the OpenTelemetry API for recording telemetry, and SDK for managing telemetry recorded by… vulnerability
- CVE-2026-118646 n8n before 1.123.85, 2.43.5, and 2.44.1 contains a regular expression denial of service vulnerability that allows authenticated members to… vulnerability
- CVE-2026-118686 EspoCRM before 9.3.11 and 10.x before 10.0.8 contains a denial of service vulnerability in which the password-redaction regular expression… vulnerability
- CVE-2026-116693 dd-trace is the Datadog APM client for Node.js. vulnerability
- CVE-2026-116588 Datadog dd-trace-py is the Datadog Python APM client. vulnerability
- CVE-2026-115822 Starman versions before 0.4019 for Perl allow CPU exhaustion via quadratic regex backtracking when parsing chunked request bodies. vulnerability
- CVE-2026-115728 @hapi/content from 6.0.1 before 6.0.3 contains a regular expression denial of service vulnerability in Content.disposition() caused by an… vulnerability
- CVE-2026-115887 GraphQL Scalars is a library of custom GraphQL scalars for creating precise type-safe GraphQL schemas. vulnerability
- CVE-2026-114603 OpenTelemetry Python provides the Python API and SDK for OpenTelemetry. vulnerability
- CVE-2026-115349 Mistune from 3.0.0 before 3.3.0 contains an algorithmic complexity denial of service vulnerability in the parse_link_text function in… vulnerability
- CVE-2026-115508 Crawl4AI 0.7.0 before 0.9.5 contains an inefficient regular expression complexity vulnerability in the Docker API server that allows… vulnerability
- CVE-2026-112300 A vulnerability was identified in DiffSK configobj up to 5.0.9. vulnerability
- CVE-2026-112366 Picomatch through 4.0.7 contains a regular expression denial of service vulnerability that allows attackers to block the event loop by… vulnerability
- CVE-2026-112901 Pillow is a Python imaging library. vulnerability
- CVE-2026-111997 ip-address before 10.7.4 allows a denial of service (CPU consumption from quadratic complexity, and application stall) via many %… vulnerability
- CVE-2026-111714 tarteaucitron.js before 1.37.0 contains a regular expression denial of service vulnerability that allows attackers to block visitor pages… vulnerability
- CVE-2026-59966 Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. vulnerability
- CVE-2026-104150 AdonisJS HTTP Server is a package for handling HTTP requests in the AdonisJS framework. vulnerability
- CVE-2026-108082 Symfony is a PHP framework for web and console applications and a set of reusable PHP components. vulnerability
- CVE-2026-110594 BottleCRM 0.43 through 1.14.5 contains a regular expression denial of service vulnerability that allows authenticated organization… vulnerability
- CVE-2026-110856 GitPython before 3.2.0 contains a regular expression denial of service vulnerability in the _re_actor_epoch pattern used by… vulnerability
- CVE-2026-110869 Nodemailer 3.0.0 before 10.0.13 has a regular expression denial of service in SMTPConnection._actionEHLO, whose four AUTH mechanism… vulnerability
- CVE-2026-109295 Open WebUI from 0.11.0 before 0.11.4 contains a regular expression denial of service vulnerability that allows authenticated users to stall… vulnerability
- CVE-2026-109563 N3.js before 2.11.1 contains a regular expression denial of service vulnerability in the N3Lexer number pattern that backtracks… vulnerability
- CVE-2026-104628 Satel Netco Design versions prior to v2.1.7 contains an inefficient regular expression complexity vulnerability. vulnerability
Referenced by CWE · has member (1)
- CWE-1468 Weaknesses Addressed by the OWASP Golang Secure Coding Practices Guide view
Referenced by OWASP · mapped cwe (1)
- CS-JavaScript_and_TypeScript_Security JavaScript and TypeScript Security Cheat Sheet Cheat Sheet