CWE-1333
Inefficient Regular Expression Complexity
Produkt używa wyrażenia regularnego o złożoności obliczeniowej w najgorszym przypadku, która jest nieefektywna i potencjalnie wykładnicza. Może to prowadzić do znacznego spowolnienia lub zawieszenia się aplikacji.
The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
YesWiki w wersjach przed 4.6.6 zawiera krytyczną podatność w komponencie CalcField.php, umożliwiającą zdalne wykonanie kodu PHP (RCE) oraz atak odmowy usługi przez ReDoS. Podatność jest szczególnie groźna ze względu na brak uwierzytelnienia wymaganego do jej wykorzystania.
W agencie Heimdal Thor w wersjach 3.4.2 i wcześniejszych (przed 3.7.0) na Windows odkryto podatność umożliwiającą ominięcie ograniczeń dostępu do urządzeń USB. Luka pozwala atakującemu na wykonanie dowolnego kodu oraz pozyskanie wrażliwych danych za pośrednictwem komponentu Next-Gen Antivirus.
Biblioteka @isaacs/brace-expansion przed wersją 5.0.1 jest podatna na atak odmowy usługi (DoS) spowodowany nieograniczoną ekspansją zakresów numerycznych w nawiasach klamrowych. Nawet niewielkie złośliwe dane wejściowe mogą doprowadzić do nadmiernego zużycia CPU i pamięci, a w konsekwencji do awarii procesu Node.js.
Framework Koa dla Node.js zawiera podatność typu ReDoS (Regular Expression Denial of Service) wynikającą z użycia nieprawidłowego wyrażenia regularnego do parsowania nagłówków HTTP. Może zostać wykorzystana przez atakującego do przeciążenia serwera i spowodowania niedostępności usługi.
W agencie Heimdal Thor dla systemów Windows (wersje 3.4.2 i wcześniejsze) oraz macOS (wersje 2.6.9 i wcześniejsze) zgłoszono podatność mogącą skutkować odmową usługi (DoS) w module Threat To Process Correlation. Warto jednak odnotować, że sam producent (Heimdal) kwestionuje zasadność tej klasyfikacji.
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.0-beta.9 until 0.9.11, the processing-instruction production in lib/grammar.js lets the greedy S+ separator and lazy Char*? data group repeatedly repartition a long whitespace tail when the required closing ?> is absent. Both parsePI and parseProcessingInstruction apply the expression to the entire remaining source, causing quadratic backtracking during DOMParser.parseFromString() under default options and allowing a small unauthenticated XML input to stall the Node.js event loop. This issue is fixed in @xmldom/xmldom version 0.9.11.
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.7.0 until 0.8.15, the release-0.8.x parser in lib/sax.js trims captured end-tag names with the unanchored global expression /[ \t\n\r]+$/g. For an end tag containing a long whitespace run followed by a non-whitespace character, the expression retries from each possible starting position and backtracks quadratically before failing its end anchor. DOMParser.parseFromString() reaches the path under default options, allowing a small unauthenticated XML input to stall the Node.js event loop; the 0.9.x and unscoped npm lines do not contain this expression. This issue is fixed in @xmldom/xmldom version 0.8.15.
NLTK versions before 3.10.0 contain a regular expression denial of service vulnerability in Text.findall() and TokenSearcher.findall() methods that accept user-supplied regular expressions without validation or timeout. Attackers can supply crafted regex patterns that cause catastrophic backtracking, resulting in indefinite CPU saturation and denial of service to all users of the Python process.
Nokogiri versions before 1.19.3 contain regular expression denial of service vulnerabilities in the CSS selector tokenizer affecting string-literal and identifier tokenization. Attackers can inject adversarial CSS selectors into methods like Node#css, Node#at_css, and Searchable#search to cause exponential regex backtracking and denial of service.
The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, TokenList construction and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees constructed by group_parenthesis and group_case, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split() before depth and token limits terminate processing. This issue is fixed in version 0.6.0.
W serwerze proxy OpenStack Swift (do wersji 2.38.0 włącznie) wykryto podatność typu ReDoS (Regular Expression Denial of Service) w parserze nagłówka HTTP Accept. Nieuwierzytelniony atakujący może doprowadzić do całkowitego wyczerpania zasobów CPU serwera proxy, skutkując zupełną niedostępnością usługi.
Komponent Symfony\Component\Yaml\Parser zawiera podatność typu ReDoS (Regular Expression Denial of Service), która pozwala atakującemu na przesłanie spreparowanego wejścia YAML, powodując arbitralnie długie zawieszenie procesu parsowania. Podatność może prowadzić do niedostępności usługi (DoS) bez wymagania jakiegokolwiek uwierzytelnienia.
Biblioteka linkify-it (obsługa rozpoznawania linków w Unicode) przed wersją 5.0.1 zawiera podatność typu ReDoS wynikającą z kwadratowej złożoności algorytmicznej. Usługi synchronicznie renderujące niezaufany Markdown z opcją linkify:true są narażone na wyczerpanie zasobów procesu roboczego poprzez spreparowane żądanie o rozmiarze kilkudziesięciu kilobajtów.
Podatność w frameworku Phalcon (PHP) przed wersją 5.15.0 pozwala nieuwierzytelnionemu atakującemu wywołać wyczerpanie zasobów CPU poprzez spreparowane żądanie HTTP. Wynika ona z użycia zagnieżdżonych kwantyfikatorów w wyrażeniach regularnych PCRE w domyślnym routerze, co prowadzi do katastrofalnego backtrackingu.
W silniku wnioskowania vLLM przed wersją 0.24.0 parametr API structured_outputs.regex przekazuje wyrażenie regularne dostarczone przez użytkownika bezpośrednio do kompilatorów gramatyki bez żadnego limitu czasu kompilacji. Umożliwia to przeprowadzenie ataku ReDoS (Regular Expression Denial of Service) za pomocą jednego złośliwego żądania, co może całkowicie zablokować pracownika wnioskowania.
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, Mistune is vulnerable to a CPU exhaustion DoS due to superlinear (approximately O(n²)) behavior in parse_link_text. When parsing Markdown containing many consecutive [ characters, parse_link_text repeatedly scans the input using a regex search inside a loop. Each iteration re-scans a large portion of the remaining string, resulting in quadratic-time behavior. An attacker-controlled Markdown input can therefore trigger excessive CPU usage with a very small payload. This vulnerability is fixed in 3.3.0.
Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to versions 8.6.77 and 9.9.1-alpha.1, an unauthenticated attacker who knows a publicly-known Parse Application ID can submit a single HTTP request whose client SDK version field contains adversarial input that triggers polynomial backtracking in a request-header parser. The parsing runs before session authentication and before rate limiting on every /parse/* request, so the request consumes seconds to minutes of synchronous CPU on a Node.js worker before any access control evaluates it. A small number of concurrent requests can saturate a worker; a single large request via the body-field variant can pin a worker for minutes. Production deployments running the default configuration are affected. This issue has been patched in versions 8.6.77 and 9.9.1-alpha.1.
In versions 3.0.0a1 through 3.2.0 of Mistune, there is a ReDoS (Regular Expression Denial of Service) vulnerability in `LINK_TITLE_RE` that allows an attacker who can supply Markdown for parsing to cause denial of service. The regular expression used for parsing link titles contains overlapping alternatives that can trigger catastrophic backtracking. In both the double-quoted and single-quoted branches, a backslash followed by punctuation can be matched either as an escaped punctuation sequence or as two ordinary characters, creating an ambiguous pattern inside a repeated group. If an attacker supplies Markdown containing repeated ! sequences with no closing quote, the regex engine explores an exponential number of backtracking paths. This is reachable through normal Markdown parsing of inline links and block link reference definitions. A small crafted input can therefore cause significant CPU consumption and make applications using Mistune unresponsive.
GROWI provided by GROWI, Inc. is vulnerable to a regular expression denial of service (ReDoS) via a crafted input string.