Falhas do tipo CWE-131

146 resultados

Cálculo incorreto do tamanho de buffer

Ocorre quando o código calcula erroneamente a quantidade de memória necessária para um buffer, resultando em alocação insuficiente. Um atacante pode explorar isso para escrever dados além dos limites (buffer overflow), corrompendo memória adjacente, causando crash ou execução de código arbitrário.

Exemplo

Um programa lê uma string de entrada e aloca espaço multiplicando o número de caracteres por sizeof(char), mas esquece de considerar o terminador nulo, ou miscalcula o tamanho total em uma operação aritmética complexa. Quando copia a string para o buffer, ela transborda e sobrescreve variáveis críticas da pilha.

Como mitigar

Use funções seguras de alocação que validem o tamanho (como safe_malloc em C), sempre inclua o espaço para terminadores e metadados, e teste o cálculo com valores extremos. Em linguagens de alto nível (Python, Java, Go), prefira usar estruturas dinâmicas que gerenciam tamanho automaticamente.

CVE-2019-19282HIGHA vulnerability has been identified in OpenPCS 7 V8.1 (All versions), OpenPCS 7 V8.2 (All versions), OpenPCS 7 V9.0 (All versions < V9.0 UpdEPSS 1.3%CVE-2021-21776CRITICALAn out-of-bounds write vulnerability exists in the SGI Format Buffer Size Processing functionality of Accusoft ImageGear 19.8. A specially cEPSS 1.3%CVE-2020-1680MEDIUMJunos OS: MX Series: MS-MPC/MIC might crash when processing malformed IPv6 packet in NAT64 configuration.EPSS 1.3%CVE-2021-21782CRITICALAn out-of-bounds write vulnerability exists in the SGI format buffer size processing functionality of Accusoft ImageGear 19.8. A specially cEPSS 1.3%CVE-2021-38423MEDIUMGurumDDS Heap-based Incorrect Calculation of Buffer SizeEPSS 1.2%CVE-2023-0568HIGHArray overrun in common path resolve codeEPSS 1.2%CVE-2021-21824HIGHAn out-of-bounds write vulnerability exists in the JPG Handle_JPEG420 functionality of Accusoft ImageGear 19.9. A specially crafted malformeEPSS 1.2%CVE-2021-21793CRITICALAn out-of-bounds write vulnerability exists in the JPG sof_nb_comp header processing functionality of Accusoft ImageGear 19.8 and 19.9. A spEPSS 1.1%CVE-2022-22137CRITICALA memory corruption vulnerability exists in the ioca_mys_rgb_allocate functionality of Accusoft ImageGear 19.10. A specially-crafted malformEPSS 1.1%CVE-2022-39377HIGHsysstat Incorrect Buffer Size calculation on 32-bit systems results in RCE via buffer overflowEPSS 1.1%CVE-2023-5941libc stdio buffer overflowEPSS 1.1%CVE-2023-30575MEDIUMApache Guacamole: Incorrect calculation of Guacamole protocol element lengthsEPSS 1.0%CVE-2023-24819CRITICALRIOT-OS vulnerable to Buffer Overflow during IPHC receiveEPSS 1.0%CVE-2022-2520A flaw was found in libtiff 4.4.0rc1. There is a sysmalloc assertion fail in rotateImage() at tiffcrop.c:8621 that can cause program crash wEPSS 0.9%CVE-2023-4257HIGHUnchecked user input length in the Zephyr WiFi shell moduleEPSS 0.9%CVE-2025-1861MEDIUMStream HTTP wrapper truncates redirect location to 1024 bytesEPSS 0.8%CVE-2023-50736CRITICALA vulnerability has been identified in the PostScript interpreter in various Lexmark devices.EPSS 0.8%CVE-2026-4152HIGHGIMP JP2 File Parsing Heap-based Buffer Overflow Remote Code Execution VulnerabilityEPSS 0.7%CVE-2025-62550HIGHAzure Monitor Agent Remote Code Execution VulnerabilityEPSS 0.7%CVE-2024-28052MEDIUMThe WBR-6012 is a wireless SOHO router. It is a low-cost device which functions as an internet gateway for homes and small offices while aimEPSS 0.7%