CWEweakness
CWE-407 Inefficient Algorithmic Complexity
Low
Official page ↗
- Alternate terms
- Quadratic Complexity
- Abstraction
- Class
- Structure
- Simple
- Status
- Incomplete
- Likelihood of exploit
- Low
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.
Common consequences
• Availability: DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Resource Consumption (Other) — The typical consequence is CPU consumption, but memory consumption and consumption of other resources can also occur.
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-2021-32617: C++ library for image metadata has "quadratic complexity" issue with unnecessarily repetitive parsing each time an invalid character is encountered
• CVE-2020-10735: Python has "quadratic complexity" issue when converting string to int with many digits in unexpected bases
• CVE-2020-5243: server allows ReDOS with crafted User-Agent strings, due to overlapping capture groups that cause excessive backtracking.
• CVE-2014-1474: Perl-based email address parser has "quadratic complexity" issue via a string that does not contain a valid address
• CVE-2003-0244: CPU consumption via inputs that cause many hash table collisions.
• CVE-2003-0364: CPU consumption via inputs that cause many hash table collisions.
• CVE-2002-1203: Product performs unnecessary processing before dropping an invalid packet.
• CVE-2001-1501: CPU and memory consumption using many wildcards.
• CVE-2004-2527: Product allows attackers to cause multiple copies of a program to be loaded more quickly than the program can detect that other copies are running, then exit. This type of error should probably have its own category, where teardown takes more time than initialization.
• CVE-2006-6931: Network monitoring system allows remote attackers to cause a denial of service (CPU consumption and detection outage) via crafted network traffic, aka a "backtracking attack."
• CVE-2006-3380: Wiki allows remote attackers to cause a denial of service (CPU consumption) by performing a diff between large, crafted pages that trigger the worst case algorithmic complexity.
• CVE-2006-3379: Wiki allows remote attackers to cause a denial of service (CPU consumption) by performing a diff between large, crafted pages that trigger the worst case algorithmic complexity.
• CVE-2005-2506: OS allows attackers to cause a denial of service (CPU consumption) via crafted Gregorian dates.
• CVE-2005-1792: Memory leak by performing actions faster than the software can clear them.
Related
Observed example · CVE (14)
- CVE-2020-10735 A flaw was found in python. vulnerability
- CVE-2021-32617 Exiv2 is a command-line utility and C++ library for reading, writing, deleting, and modifying the metadata of image files. 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-2014-1474 Algorithmic complexity vulnerability in Email::Address::List before 0.02, as used in RT 4.2.0 through 4.2.2, allows remote attackers to… vulnerability
- CVE-2006-6931 Algorithmic complexity vulnerability in Snort before 2.6.1, during predicate evaluation in rule matching for certain rules, allows remote… vulnerability
- CVE-2006-3379 Algorithmic complexity vulnerability in Hiki Wiki 0.6.0 through 0.6.5 and 0.8.0 through 0.8.5 allows remote attackers to cause a denial of… vulnerability
- CVE-2006-3380 Algorithmic complexity vulnerability in FreeStyle Wiki before 3.6.2 allows remote attackers to cause a denial of service (CPU consumption)… vulnerability
- CVE-2005-2506 Algorithmic complexity vulnerability in CoreFoundation in Mac OS X 10.3.9 and 10.4.2 allows attackers to cause a denial of service (CPU… vulnerability
- CVE-2005-1792 Memory leak in Windows Management Instrumentation (WMI) service allows attackers to cause a denial of service (memory consumption and… vulnerability
- CVE-2004-2527 The local and remote desktop login screens in Microsoft Windows XP before SP2 and 2003 allow remote attackers to cause a denial of service… vulnerability
- CVE-2003-0364 The TCP/IP fragment reassembly handling in the Linux kernel 2.4 allows remote attackers to cause a denial of service (CPU consumption) via… vulnerability
- CVE-2003-0244 The route cache implementation in Linux 2.4, and the Netfilter IP conntrack module, allows remote attackers to cause a denial of service… vulnerability
- CVE-2002-1203 IBM SecureWay Firewall before 4.2.2 performs extra processing before determining that a packet is invalid and dropping it, which allows… vulnerability
- CVE-2001-1501 The glob functionality in ProFTPD 1.2.1, and possibly other versions allows remote attackers to cause a denial of service (CPU and memory… vulnerability
Child of · CWE (1)
- CWE-405 Asymmetric Resource Consumption (Amplification) weakness
Referenced by CVE · weakness (268)
- CVE-2019-25781 Python-Markdown 3.0 through 3.11.2 contains an algorithmic complexity vulnerability in inline link parsing that allows remote attackers to… vulnerability
- CVE-2026-116133 HTTP::Body versions before 1.23_01 for Perl allow CPU exhaustion via quadratic rescanning of a multipart body with a missing or malformed… vulnerability
- CVE-2026-116267 MIME::Parser versions before 5.521 for Perl allow memory exhaustion via indented error messages from a truncated, deeply nested message. vulnerability
- CVE-2026-116270 MIME::Words versions before 5.521 for Perl allow memory exhaustion via repeated "=?" sequences in decode_mimewords. vulnerability
- CVE-2026-116795 RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching. vulnerability
- CVE-2026-118035 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, inefficient algorithmic… vulnerability
- CVE-2026-118036 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027, uncontrolled recursion, infinite loop, inefficient… vulnerability
- CVE-2026-118664 decode-uri-component provides a more robust alternative to decodeURIComponent. vulnerability
- CVE-2026-118694 python-markdown2 through 2.5.5 contains a denial of service vulnerability that allows remote users to exhaust CPU by submitting Markdown… vulnerability
- CVE-2026-116872 Semantic MediaWiki from 3.0.0 before 7.3.1 contains an algorithmic complexity vulnerability in TermParser::normalize_compact_form() that… vulnerability
- CVE-2026-117540 svg-sanitizer from 0.5.3 before 1.1.0 contains a denial of service vulnerability in Sanitizer::sanitize() that repeatedly rescans the whole… vulnerability
- CVE-2026-108529 Inefficient Algorithmic Complexity vulnerability in the HTTP/2 implementation of mtrudel bandit allows an unauthenticated remote attacker… vulnerability
- CVE-2026-113436 Inefficient Algorithmic Complexity vulnerability in the header integer parser of mtrudel bandit allows an unauthenticated remote attacker… vulnerability
- CVE-2026-116577 Tornado is a Python web framework and asynchronous networking library. vulnerability
- CVE-2026-116587 Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web… vulnerability
- CVE-2026-65631 Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by… vulnerability
- CVE-2026-115585 pypdf is a free and open-source pure-python PDF library. vulnerability
- CVE-2026-16762 An attacker able to supply a crafted XML document to an application using QXmlStreamReader can cause disproportionate CPU consumption… vulnerability
- CVE-2026-89314 `jwkFields.CheckConsistency` detected duplicate `key_ops` entries with a pairwise nested loop, making validation cost grow with the… vulnerability
- CVE-2026-115319 fzf 0.36.0 through 0.74.5 contains an inefficient algorithmic complexity vulnerability in maskActionContents that allows local attackers to… vulnerability
- CVE-2026-115347 Mistune before 3.3.0 contains an inefficient algorithmic complexity vulnerability in parse_link_text that allows remote attackers to cause… vulnerability
- CVE-2026-115352 Mistune before 3.3.0 contains an algorithmic complexity vulnerability in the inline link parser that allows unauthenticated attackers to… vulnerability
- CVE-2026-75507 GraphQL-core is a Python port of the GraphQL.js reference implementation. vulnerability
- CVE-2026-113789 pypdf is a free and open-source pure-python PDF library. vulnerability
- CVE-2026-114129 stream-json is a micro-library of stream components for processing JSON and JSONC with a minimal memory footprint. vulnerability
- CVE-2026-114138 Django REST framework is a toolkit for building Web APIs. vulnerability
- CVE-2026-114141 toml-node is a TOML parser for Node.js and the browser. vulnerability
- CVE-2026-114143 toml-node is a TOML parser for Node.js and the browser. vulnerability
- CVE-2026-19630 In a BIND resolver, inbound DNS protocol messages with a particular structure will result in additional processing, with no limit imposed… vulnerability
- CVE-2026-96640 Pillow is a Python imaging library. vulnerability
Referenced by CWE · child of (1)
- CWE-1333 Inefficient Regular Expression Complexity weakness