Falhas do tipo CWE-1333

407 resultados

Expressão regular com complexidade exponencial (ReDoS)

A aplicação usa uma regex que, em certos padrões de entrada, causa backtracking excessivo e consome CPU de forma exponencial. O motor regex tenta múltiplas combinações de correspondência antes de falhar ou suceder, podendo travar a aplicação ou deixá-la lenta demais para responder.

Exemplo

Um validador de email com regex como `(a+)+b` recebe a string `aaaaaaaaaaaaaaaaaaaaX` (sem o caractere final esperado). O motor testa todas as combinações de agrupamento do `a` repetido, levando tempo exponencial em relação ao tamanho da entrada.

Como mitigar

Use bibliotecas de parsing ou validação especializadas em vez de regex complexas (ex: bibliotecas de email ou URL). Se regex for necessária, teste com inputs longos malformados, limpe a entrada antes, ou use engines regex com proteção contra backtracking (como a do Rust).

CVE-2024-21503MEDIUMVersions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the lines_with_leading_tabs_eEPSS 1.0%CVE-2021-43309MEDIUMReDoS in uri-template-lite URI.expand functionEPSS 1.0%CVE-2024-9277MEDIUMLangflow HTTP POST Request utils.py redosEPSS 1.0%CVE-2023-3994HIGHInefficient Regular Expression Complexity in GitLabEPSS 1.0%CVE-2024-3772MEDIUMRegular expression denial of service in Pydantic < 2.4.0EPSS 1.0%CVE-2022-42966MEDIUMExponential ReDoS in cleo leads to denial of serviceEPSS 1.0%CVE-2018-25079MEDIUMSegmentio is-url index.js redosEPSS 1.0%CVE-2018-25061MEDIUMrgb2hex redosEPSS 0.9%CVE-2024-12391MEDIUMRegular Expression Denial of Service (ReDoS) in binary-husky/gpt_academicEPSS 0.9%CVE-2021-4306LOWcronvel terminal-kit redosEPSS 0.9%CVE-2015-10005LOWmarkdown-it html_re.js redosEPSS 0.9%CVE-2021-4305LOWWoorank robots-txt-guard patterns.js makePathPattern redosEPSS 0.9%CVE-2019-25103MEDIUMsimple-markdown simple-markdown.js redosEPSS 0.9%CVE-2024-47889MEDIUMAction Mailer has possible ReDoS vulnerability in block_formatEPSS 0.9%CVE-2021-4299MEDIUMcronvel string-kit naturalSort.js naturalSort redosEPSS 0.9%CVE-2024-45296HIGHpath-to-regexp outputs backtracking regular expressionsEPSS 0.9%CVE-2022-36034HIGHPossible Regular Expression Denial of Service (ReDoS) used on uncontrolled data in nitrado.jsEPSS 0.9%CVE-2020-36661LOWKong lua-multipart multipart.lua is_header redosEPSS 0.9%CVE-2023-33950MEDIUMPattern Redirects in Liferay Portal 7.4.3.48 through 7.4.3.76, and Liferay DXP 7.4 update 48 through 76 allows regular expressions that are EPSS 0.9%CVE-2023-0632MEDIUMInefficient Regular Expression Complexity in GitLabEPSS 0.9%