Falhas do tipo CWE-704

94 resultados

Conversão ou casting incorreto de tipo

Ocorre quando o código converte um objeto ou dado de um tipo para outro de forma inadequada, sem validar se a conversão é segura ou se preserva a semântica esperada. Isso pode levar a interpretações erradas dos dados, corrupção de estado ou execução de código com privilégios indevidos.

Exemplo

Um aplicativo recebe um ponteiro genérico (void*) de rede e faz casting direto para uma estrutura específica sem verificar o tipo real. Se o servidor enviar dados de um tipo diferente, o acesso aos campos interpretará lixo de memória como valores válidos, causando lógica corrompida ou crash.

Como mitigar

Implemente validação de tipo antes de qualquer conversão (use type tags, discriminadores ou metadados). Prefira conversões explícitas que falham seguramente em vez de casts silenciosos; em linguagens como C, use structs com type identifiers ou serialize/desserialize com schema validation (JSON Schema, Protocol Buffers).

CVE-2021-3578A flaw was found in mbsync before v1.3.6 and v1.4.2, where an unchecked pointer cast allows a malicious or compromised server to write an arEPSS 1.0%CVE-2024-39590HIGHMultiple invalid pointer dereference vulnerabilities exist in the OpenPLC Runtime EtherNet/IP parser functionality of OpenPLC_v3 16bf8bac1a3EPSS 1.0%CVE-2024-39589HIGHMultiple invalid pointer dereference vulnerabilities exist in the OpenPLC Runtime EtherNet/IP parser functionality of OpenPLC_v3 16bf8bac1a3EPSS 1.0%CVE-2010-20115CRITICALVermillion FTP <= 1.31 Daemon PORT Command Memory CorruptionEPSS 0.9%CVE-2025-41648CRITICALPilz: Authentication Bypass in IndustrialPI WebstatusEPSS 0.8%CVE-2023-25737HIGHAn invalid downcast from <code>nsTextNode</code> to <code>SVGElement</code> could have lead to undefined behavior. This vulnerability affectEPSS 0.7%CVE-2021-39989HIGHThe HwNearbyMain module has a Exposure of Sensitive Information to an Unauthorized Actor vulnerability.Successful exploitation of this vulneEPSS 0.7%CVE-2026-59871MEDIUMnode-tar: Process crash via PAX numeric path type confusionEPSS 0.6%CVE-2022-1642A program using swift-corelibs-foundation is vulnerable to a denial of service attack caused by a potentially malicious source producing a JEPSS 0.6%CVE-2026-55076HIGHCoder's OIDC email_verified type coercion bypass enables account takeover via unverified email linkingEPSS 0.6%CVE-2025-51678HIGHAn issue was discovered in RISC-V PicoRV32 commit 87c89a. A mismatch in the PCPI INSN and memory address can lead to unexpected behavior.EPSS 0.6%CVE-2024-47181HIGHUnaligned memory access in RPL option processing in Contiki-NGEPSS 0.6%CVE-2025-40541CRITICALSolarWinds Serv-U Insecure Direct Object Reference (IDOR) Remote Code Execution VulnerabilityEPSS 0.6%CVE-2025-12781MEDIUMbase64.b64decode() always accepts "+/" characters, despite setting altcharsEPSS 0.6%CVE-2025-21088MEDIUMWebApp crash via improper validation of proto style in attachmentsEPSS 0.6%CVE-2025-20072MEDIUMMobile crash via improper validation of proto style in attachmentsEPSS 0.5%CVE-2024-5436HIGHType Confusion in Snapchat LenscoreEPSS 0.5%CVE-2020-11725HIGHsnd_ctl_elem_add in sound/core/control.c in the Linux kernel through 5.6.3 has a count=info->owner line, which later affects a private_size*EPSS 0.5%CVE-2025-62494HIGHType confusion in string addition in QuickJSEPSS 0.5%CVE-2022-41890MEDIUM`CHECK` fail in `BCast` overflow in TensorflowEPSS 0.5%