Weaknesses of type CWE-351

15 results

Distinção insuficiente de tipos

A aplicação não diferencia adequadamente entre tipos de dados ou objetos diferentes, tratando-os de forma intercambiável quando deveriam ser separados. Isso permite que um atacante contorne validações ou execute ações não autorizadas ao passar um tipo onde outro era esperado.

Example

Um sistema de processamento de arquivo aceita tanto uploads de imagem quanto documento, mas a validação não distingue entre os dois tipos — um atacante envia um script malicioso renomeado com extensão .jpg, que é processado como imagem em vez de ser bloqueado.

How to mitigate

Valide explicitamente o tipo esperado usando verificações de assinatura do arquivo (magic bytes), não apenas extensão, e implemente lógica de tratamento específica para cada tipo. Mantenha tipos distintos em estruturas separadas quando possível, evitando conversões implícitas perigosas.

CVE-2023-38831HIGHRARLAB WinRAR before 6.23 allows attackers to execute arbitrary code when a user attempts to view a benign file within a ZIP archive. The isEPSS 97.8%KEVCVE-2020-10134MEDIUMBluetooth devices supporting LE and specific BR/EDR implementations are vulnerable to method confusion attacksEPSS 0.7%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-2024-4769MEDIUMWhen importing resources using Web Workers, error messages would distinguish the difference between `application/javascript` responses and nEPSS 0.4%CVE-2025-31951HIGHHCL BigFix RunBookAI is affected by a Unvalidated Command Input / Potential Command Smuggling vulnerabilityEPSS 0.2%CVE-2025-30510CRITICALGrowatt Cloud portal Insufficient Type DistinctionEPSS 0.2%CVE-2026-15305MEDIUMTYPO3 CMS - Unrestricted File Upload in Form FrameworkEPSS 0.2%CVE-2025-65960MEDIUMContao is vulnerable to remote code execution in template closuresEPSS 0.2%CVE-2025-32035LOWDNN does not check the contents of a file when uploading filesEPSS 0.2%CVE-2025-47939MEDIUMTYPO3 CMS Vulnerable to Unrestricted File Upload in File Abstraction LayerEPSS 0.2%CVE-2024-45676MEDIUMIBM Cognos Controller file uploadEPSS 0.2%CVE-2023-2866HIGHAdvantech WebAccess Insufficient Type DistinctionEPSS 0.1%CVE-2025-54413HIGHskops' MethodNode can access unexpected object fields through dot notation, leading to arbitrary code execution at load timeEPSS 0.1%CVE-2025-54412HIGHskops' Inconsistent Trusted Type Validation Enables Hidden `operator` Methods ExecutionEPSS 0.1%CVE-2026-41341LOWOpenClaw < 2026.3.31 - Component Interaction Misclassification in Discord ExtensionEPSS 0.1%