Falhas do tipo CWE-697

103 resultados

Comparação incorreta

O código compara valores ou objetos de forma inadequada, usando operadores errados ou não considerando o tipo de dados envolvido. Isso permite que condições de segurança sejam contornadas: um atacante entra onde não deveria porque a lógica de comparação não funciona como o desenvolvedor pretendia.

Exemplo

Um sistema valida acesso comparando a string do token com == em vez de usar comparação constante: se (token == tokenEsperado). Um atacante testa strings como '0' ou null que podem ser iguais por coerção de tipo, burlando a autenticação.

Como mitigar

Use operadores de comparação apropriados ao tipo (=== ou equals() em vez de ==), implemente comparação constante-time para valores sensíveis (HMAC ou funções específicas), e valide tipos explicitamente antes de comparar. Em java, use .equals() ou MessageDigest.isEqual(); em Python, use == com casting apropriado ou bibliotecas como secrets.compare_digest().

CVE-2015-10129LOWplanet-freo auth.inc.php comparisonEPSS 0.6%CVE-2023-23765MEDIUMIncorrect comparison vulnerability in GitHub Enterprise Server leading to commit smugglingEPSS 0.6%CVE-2026-64836HIGHICEcoder through 8.1 Path Traversal via Ineffective File::check() ConfinementEPSS 0.6%CVE-2026-22660HIGHFlaskBB Logic Flaw Authorization Group Deletion via Bulk AJAX EndpointEPSS 0.6%CVE-2026-56101MEDIUMOpenBSD ieee80211_crypto_tkip.c TKIP MIC Countermeasure Logic Inversion DoSEPSS 0.6%CVE-2023-22435HIGH Server bad parsing implementation - stack overflow in server::get_db_path_for_driverEPSS 0.6%CVE-2023-23764MEDIUMIncorrect comparison vulnerability in GitHub Enterprise Server leading to commit smugglingEPSS 0.6%CVE-2026-61795MEDIUMCapsule: hostnameRegexHandler.OnUpdate validates stale (old) Tenant regex, allowing invalid AllowedHostnames regex to bypass webhook validationEPSS 0.6%CVE-2022-35091MEDIUMSWFTools commit 772e55a2 was discovered to contain a floating point exception (FPE) via DCTStream::readMCURow() at /xpdf/Stream.cc.ow()EPSS 0.6%CVE-2026-55771HIGHCedarJava has policy injection, type confusion, and incorrect equality comparison vulnerabilitiesEPSS 0.6%CVE-2025-48952CRITICALNetAlertX has Password Bypass Vulnerability due to Loose Comparison in PHPEPSS 0.6%CVE-2026-34210MEDIUMmppx has Stripe charge credential replay via missing idempotency checkEPSS 0.6%CVE-2026-67207HIGHWolf CMS 0.8.3.1 Authorization Bypass via BackupRestoreControllerEPSS 0.5%CVE-2026-48032HIGHHulumi: IAM-role policy checks bypassed when the role trusts multiple OIDC providersEPSS 0.5%CVE-2026-44196CRITICALPingvin Share X: TOTP Authentication Bypass via Password-only LoginEPSS 0.5%CVE-2026-14687MEDIUM666ghj BettaFish InsightEngine search-result Deduplication agent.py _deduplicate_results partial string comparisonEPSS 0.5%CVE-2026-71855MEDIUMSuricata flow: IPv4/IPv6 hash collision can reuse wrong flow stateEPSS 0.5%CVE-2025-54336CRITICALIn Plesk Obsidian 18.0.70, _isAdminPasswordValid uses an == comparison. Thus, if the correct password is "0e" followed by any digit string, EPSS 0.5%CVE-2026-49846HIGHlibks has path traversal in kws HTTP parser via URI segment overflowEPSS 0.5%CVE-2024-23903MEDIUMJenkins GitLab Branch Source Plugin 684.vea_fa_7c1e2fe3 and earlier uses a non-constant time comparison function when checking whether the pEPSS 0.5%