Weaknesses of type CWE-241

33 results

Tratamento inadequado de tipo de dados inesperado

O código assume um tipo de dados específico (string, inteiro, objeto) sem validar o que realmente recebeu, causando comportamento imprevisto ou falha. Quando dados de tipo diferente chegam — por entrada do usuário, API, ou arquivo — o programa não consegue processar corretamente e pode falhar, expor informações ou executar lógica errada.

Example

Uma função espera receber um inteiro representando quantidade de itens, mas recebe uma string ou null. Sem validação, tenta fazer operações aritméticas diretamente, causando exceção ou resultado inválido. Em linguagens fracamente tipadas (JavaScript, PHP), pode resultar em coerção silenciosa que leva a lógica segura a se comportar de forma não esperada.

How to mitigate

Valide explicitamente o tipo de dados na entrada: use type-checking antes de processar (typeof, instanceof, ou validadores de schema como Joi, Zod). Em linguagens tipadas, configure verificação em tempo de compilação. Para dados desserializados (JSON, XML), use parsers seguros com type constraints claros.

CVE-2025-1004MEDIUMCertain HP LaserJet Pro Printers – Potential Denial of ServiceEPSS 0.4%CVE-2022-39065MEDIUMA single malformed IEEE 802.15.4 (Zigbee) frame makes the TRÅDFRI gateway unresponsive, such that connected lighting cannot be controlled wiEPSS 0.4%CVE-2022-39064HIGHAn attacker sending a single malformed IEEE 802.15.4 (Zigbee) frame makes the TRÅDFRI bulb blink, and if they replay (i.e. resend) the same EPSS 0.4%CVE-2021-0243MEDIUMJunos OS: EX4300: Stateless firewall policer fails to discard trafficEPSS 0.4%CVE-2024-37316MEDIUMNextcloud Calendar's event create can create attachments that link to other websitesEPSS 0.4%CVE-2025-66550MEDIUMNextcloud Calendar attachments of local files are offered to downloadedEPSS 0.3%CVE-2025-63548HIGHAn issue in Eprosima Micro-XREC-DDS Agent v.3.0.1 allows a remote attacker to cause a denial of service via a packet specially crafted to beEPSS 0.3%CVE-2026-47110HIGHTiptap for PHP < 2.1.1 DoS via Malformed href AttributeEPSS 0.3%CVE-2024-21927MEDIUMImproper input validation in Satellite Management Controller (SMC) may allow an attacker with privileges to use certain special characters iEPSS 0.3%CVE-2022-22193MEDIUMJunos OS and Junos OS Evolved: In a BGP rib-sharding scenario when a certain CLI command is executed the rpd process might crashEPSS 0.2%CVE-2024-32268LOWAn issue in Tuya Smart camera U6N v.3.2.5 allows a remote attacker to cause a denial of service via a crafted packet to the network connectiEPSS 0.2%CVE-2024-21935MEDIUMImproper input validation in Satellite Management Controller (SMC) may allow an attacker with privileges to manipulate Redfish® API commandsEPSS 0.2%CVE-2025-7339LOWon-headers vulnerable to http response header manipulationEPSS 0.2%