Weaknesses of type CWE-189

56 results

Erro numérico

Fraqueza ampla que engloba falhas no cálculo, comparação ou conversão de números inteiros e ponto flutuante — como overflow, underflow, truncamento de sinal ou perda de precisão. Essas falhas podem levar a comportamento inesperado, bypass de validações ou execução de código não autorizado.

Example

Um sistema de permissões usa um inteiro de 16 bits para armazenar IDs de usuários. Se o ID exceder 65535, ocorre overflow e o valor volta a zero, causando acesso com privilégios errados. Outro caso: uma API aceita quantidade de bytes como inteiro; se passar um valor negativo, a comparação `tamanho > limite` falha e permite upload de arquivo acima do permitido.

How to mitigate

Valide rigorosamente entradas numéricas (range, tipo, sinal). Use tipos numéricos com capacidade adequada ao domínio (ex: long em vez de int para IDs). Implemente verificação de overflow/underflow antes de cálculos críticos e testes de segurança com valores extremos (máximo, mínimo, negativos, zero).

CVE-2026-7736MEDIUMosrg GoBGP mrt.go parseRibEntry integer underflowEPSS 0.5%CVE-2026-5123MEDIUMosrg GoBGP bgp.go DecodeFromBytes off-by-oneEPSS 0.4%CVE-2026-94090MEDIUMJusticeRage Manalyze PE Parser pe.cpp _parse_debug integer underflowEPSS 0.4%CVE-2023-21801HIGHMicrosoft PostScript and PCL6 Class Printer Driver Remote Code Execution VulnerabilityEPSS 0.4%CVE-2026-8276MEDIUMbettercap MySQL Server mysql_server.go integer coercionEPSS 0.4%CVE-2026-82480MEDIUMNASA cFS cFE Software Bus cfe_sb_util.c CFE_SB_GetUserDataLength integer underflowEPSS 0.4%CVE-2026-102804MEDIUMNothings stb stb_hexwave.h hexwave_init integer overflowEPSS 0.3%CVE-2026-102805MEDIUMNothings stb Image Encoding stb_image_write.h stbi_write_tga_core integer overflowEPSS 0.3%CVE-2026-112158HIGHMikroTik RouterOS ipt_SAME.ko same_check integer overflowEPSS 0.3%CVE-2026-101279MEDIUMTrusted Domain Project OpenDMARC opendmarc_policy.c integer overflowEPSS 0.3%CVE-2026-101014MEDIUMTrusted Domain Project OpenDMARC DMARC Record opendmarc_util.c opendmarc_util_cleanup off-by-oneEPSS 0.3%CVE-2026-100889MEDIUMTrusted Domain Project OpenDKIM Decoder util.c dkim_qp_decode off-by-oneEPSS 0.3%CVE-2025-5001MEDIUMGNU PSPP pspp-convert.c calloc integer overflowEPSS 0.3%CVE-2025-9688LOWMupen64Plus is_viewer.c write_is_viewer integer overflowEPSS 0.3%CVE-2026-103222MEDIUMBlosc C-Blosc2 blosclz Decompression blosclz.c blosclz_decompress integer overflowEPSS 0.3%CVE-2026-93313MEDIUMFreedesktop Poppler JBIG2Stream.cc readCodeTableSeg integer overflowEPSS 0.2%CVE-2026-93314MEDIUMFreedesktop Poppler FoFiTrueType.cc mapCodeToGID integer overflowEPSS 0.2%CVE-2026-112074MEDIUMTencent ncnn Conversion API mat_pixel.cpp yuv420sp2rgb integer overflowEPSS 0.2%CVE-2025-15534MEDIUMraysan5 raylib rtext.c LoadFontData integer overflowEPSS 0.2%CVE-2026-3284MEDIUMlibvips extract.c vips_extract_area_build integer overflowEPSS 0.2%