Falhas do tipo CWE-369
222 resultadosDivisão por zero
Ocorre quando o código tenta dividir um número por zero, causando exceção ou comportamento indefinido. É perigoso porque pode derrubar a aplicação, gerar resultados inesperados ou ser explorado para negar serviço.
Exemplo
Um endpoint que calcula média de notas recebe um parâmetro de quantidade de alunos sem validar: se esse valor for zero, a divisão total/quantidade gera erro e a API cai. Um atacante envia requisições malformadas propositalmente para derrubar o serviço.
Como mitigar
Valide todos os denominadores antes de operações aritméticas — verifique se é diferente de zero, trate a condição com lógica apropriada (retorne erro, valor padrão ou zero conforme a regra de negócio). Use análise estática para detectar divisões não protegidas.
CVE-2021-47641MEDIUMvideo: fbdev: cirrusfb: check pixclock to avoid divide by zeroEPSS 0.3%CVE-2024-56369MEDIUMdrm/modes: Avoid divide by zero harder in drm_mode_vrefresh()EPSS 0.3%CVE-2024-50232MEDIUMiio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()EPSS 0.2%CVE-2021-4216—A Floating point exception (division-by-zero) flaw was found in Mupdf for zero width pages in muraster.c. It is fixed in Mupdf-1.20.0-rc1 upEPSS 0.2%CVE-2026-7007MEDIUMDivision by zero in Zephyr ext2 superblock parsing allows DoS via crafted filesystem imageEPSS 0.2%CVE-2026-122330MEDIUMBlosc c-blosc2 before 3.5.0 Divide-by-Zero via blosc2_schunk_get_slice_buffer()EPSS 0.2%CVE-2024-56567MEDIUMad7780: fix division by zero in ad7780_write_raw()EPSS 0.2%CVE-2024-26945HIGHcrypto: iaa - Fix nr_cpus < nr_iaa caseEPSS 0.2%CVE-2026-121410MEDIUMFreeRDP before 3.32.2 Denial of Service via RDPGFX ALPHA WIRETOSURFACE_2EPSS 0.2%CVE-2025-21898MEDIUMftrace: Avoid potential division by zero in function_stat_show()EPSS 0.2%CVE-2021-25675—A vulnerability has been identified in SIMATIC S7-PLCSIM V5.4 (All versions). An attacker with local access to the system could cause a DeniEPSS 0.2%CVE-2024-50205MEDIUMALSA: firewire-lib: Avoid division by zero in apply_constraint_to_size()EPSS 0.2%CVE-2025-15564MEDIUMMapnik value.cpp operator divide by zeroEPSS 0.2%CVE-2025-46158MEDIUMAn issue in redoxOS kernel before commit 5d41cd7c allows a local attacker to cause a denial of service via the `setitimer` syscallEPSS 0.2%CVE-2025-21793MEDIUMspi: sn-f-ospi: Fix division by zeroEPSS 0.2%CVE-2026-107359HIGHMalformed Wi-Fi Beacon Causes Crash on WF200EPSS 0.2%CVE-2024-1298MEDIUMInteger Overflow caused by divide by zero during S3 suspensionEPSS 0.2%CVE-2024-7867LOWInteger overflow and divide-by-zero in Xpdf 4.05 due to bogus page box coordinatesEPSS 0.2%CVE-2021-29599LOWDivision by zero in TFLite's implementation of `Split`EPSS 0.2%CVE-2026-46470MEDIUMAn issue was discovered in GStreamer gst-plugins-good before 1.28.2. When parsing MP4 audio tracks, the isomp4 plugin's qtdemux_audio_caps fEPSS 0.2%