Weaknesses of type CWE-252

130 results

Retorno de função não verificado

É quando o código chama uma função que pode falhar ou retornar erro, mas ignora o valor retornado. O programa segue como se tudo tivesse funcionado, criando condições perigosas: um arquivo que deveria ter sido aberto não foi, uma alocação de memória falhou, ou uma criptografia não ocorreu. A falha passa despercebida e o código trabalha com dados inválidos.

Example

Uma função tenta abrir um arquivo de configuração com `fopen()` ou similar, mas o código não verifica se retornou NULL. Depois tenta ler dados do arquivo nulo, causando crash ou leitura de lixo de memória. Ou chama `malloc()` sem verificar se retornou NULL antes de usar o ponteiro.

How to mitigate

Sempre verifique o retorno de funções que podem falhar — arquivo, memória, criptografia, validação. Use flags de compilador que alertam sobre returns não verificados (`-Wunused-result` no GCC/Clang). No código, implemente tratamento explícito: `if (!função()) { tratarErro(); }` ou use padrões de erro apropriados (exceções, enums, logs).

CVE-2026-79772MEDIUMNokogiri before 1.19.1 Unchecked Return Value canonicalizeEPSS 0.3%CVE-2026-107838HIGHRIOT: nanocoap_fileserver ignores response initialization failure, leading to reachable assertionEPSS 0.3%CVE-2026-86749HIGHsnipe-it before 8.7.0 Data Loss via Failed Image WriteEPSS 0.3%CVE-2026-22046HIGHiccDEV has heap-buffer-overflow in CIccProfileXml::ParseBasic() at IccXML/IccLibXML/IccProfileXml.cppEPSS 0.3%CVE-2025-62791MEDIUMWazuh vulnerable to NULL pointer dereference in DecodeCiscatEPSS 0.3%CVE-2023-41092HIGHUnchecked return value in SDM firmware for Intel(R) Stratix 10 and Intel(R) Agilex 7 FPGAs before version 23.3 may allow an authenticated usEPSS 0.3%CVE-2026-40060HIGHBIG-IP Advanced WAF and ASM vulnerabilityEPSS 0.3%CVE-2026-115403HIGHNULL pointer dereference in the BSD raw IPv6 send path when the destination table is fullEPSS 0.3%CVE-2023-3013MEDIUMUnchecked Return Value in gpac/gpacEPSS 0.3%CVE-2021-0107MEDIUMUnchecked return value in the firmware for some Intel(R) Processors may allow a privileged user to potentially enable escalation of privilegEPSS 0.3%CVE-2024-12650MEDIUMWago: Vulnerability in libwagosnmpEPSS 0.3%CVE-2024-45775MEDIUMGrub2: commands/extcmd: missing check for failed allocationEPSS 0.3%CVE-2025-11839MEDIUMGNU Binutils prdbg.c tg_tag_type return valueEPSS 0.3%CVE-2026-31830HIGHsigstore-ruby verifier returns success for DSSE bundles with mismatched in-toto subject digestEPSS 0.3%CVE-2025-1394MEDIUMDenial of Service (DoS) vulnerabilitiey in Zigbee libraryEPSS 0.3%CVE-2021-3659—A NULL pointer dereference flaw was found in the Linux kernel’s IEEE 802.15.4 wireless networking subsystem in the way the user closes the LEPSS 0.3%CVE-2021-0155MEDIUMUnchecked return value in the BIOS firmware for some Intel(R) Processors may allow a privileged user to potentially enable information disclEPSS 0.3%CVE-2023-23003MEDIUMIn the Linux kernel before 5.16, tools/perf/util/expr.c lacks a check for the hashmap__new return value.EPSS 0.3%CVE-2026-61857MEDIUMImageMagick before 7.1.2-26 Heap Use-After-Free via XMPEPSS 0.3%CVE-2024-39558HIGHJunos OS and Junos OS Evolved: Receipt of specific PIM packet causes rpd crash when PIM is configured along with MoFRREPSS 0.3%