Weaknesses of type CWE-369

208 results

Divisão por zero

Fraqueza em que o código tenta dividir um número por zero sem validação prévia, causando crash, exceção ou comportamento indefinido. O risco varia: em alguns casos gera apenas erro aritmético; em outros, permite negação de serviço ou exploração mais grave dependendo do contexto de execução.

Example

Uma API recebe um parâmetro do usuário, aplica-o diretamente como divisor sem checar se é zero: `resultado = 100 / parametro_do_usuario`. Se o atacante enviar 0, a aplicação quebra ou trava, indisponibilizando o serviço.

How to mitigate

Validar sempre o divisor antes de usá-lo: checar se é diferente de zero e rejeitar ou tratar o caso com valor padrão. Em linguagens modernas, usar exceptions tipadas e logging para sinalizar tentativas suspeitas.

CVE-2025-21898MEDIUMftrace: Avoid potential division by zero in function_stat_show()EPSS 0.2%CVE-2021-25675A 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-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-2026-7007MEDIUMDivision by zero in Zephyr ext2 superblock parsing allows DoS via crafted filesystem imageEPSS 0.2%CVE-2024-1298MEDIUMInteger Overflow caused by divide by zero during S3 suspensionEPSS 0.2%CVE-2025-21793MEDIUMspi: sn-f-ospi: Fix division by zeroEPSS 0.2%CVE-2024-7867LOWInteger overflow and divide-by-zero in Xpdf 4.05 due to bogus page box coordinatesEPSS 0.2%CVE-2025-15564MEDIUMMapnik value.cpp operator divide by zeroEPSS 0.2%CVE-2021-29599LOWDivision by zero in TFLite's implementation of `Split`EPSS 0.2%CVE-2026-5747HIGHOut-of-bounds Write in Firecracker virtio-pci TransportEPSS 0.2%CVE-2026-79513MEDIUMA divide-by-zero vulnerability in the gf_dash_get_timeline_duration function (src/media_tools/dash_client.c) of GPAC v26.07.0 allows attackeEPSS 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%CVE-2024-56622MEDIUMscsi: ufs: core: sysfs: Prevent div by zeroEPSS 0.2%CVE-2023-25511LOWNVIDIA CUDA Toolkit for Linux and Windows contains a vulnerability in cuobjdump, where a division-by-zero error may enable a user to cause aEPSS 0.2%CVE-2021-29598LOWDivision by zero in TFLite's implementation of `SVDF`EPSS 0.2%CVE-2021-29587LOWDivision by zero in TFLite's implementation of `SpaceToDepth`EPSS 0.2%CVE-2021-29595LOWDivision by zero in TFLite's implementation of `DepthToSpace`EPSS 0.2%CVE-2021-29525LOWDivision by 0 in `Conv2DBackpropInput`EPSS 0.2%CVE-2021-29588LOWDivision by zero in TFLite's implementation of `TransposeConv`EPSS 0.2%CVE-2021-29585LOWDivision by zero in padding computation in TFLiteEPSS 0.2%