Weaknesses of type CWE-193

129 results

Erro de índice por um (off-by-one)

Ocorre quando o código usa um índice incorreto em operações com arrays, buffers ou loops — tipicamente iterando uma posição a mais ou a menos do que deveria. Isso causa acesso a memória inválida, leitura de dados além dos limites da estrutura ou corrupção de dados adjacentes.

Example

Um loop que processa um array de 10 elementos mas itera de 0 a 10 (em vez de 0 a 9) e tenta acessar array[10], lendo ou sobrescrevendo memória fora do escopo da variável. Ou uma validação de tamanho que permite um byte além do buffer esperado.

How to mitigate

Use índices a partir de 0 e compare com tamanho (i < tamanho, nunca <=). Prefira iteradores de linguagens modernas (for-each, ranges) em vez de índices manuais. Aplique testes automáticos com fuzzing e análise estática para detectar essas falhas antes da produção.

CVE-2024-51554HIGHoff-by-one-errorEPSS 0.4%CVE-2024-57259HIGHsqfs_search_dir in Das U-Boot before 2025.01-rc1 exhibits an off-by-one error and resultant heap memory corruption for squashfs directory liEPSS 0.4%CVE-2024-48854MEDIUMVulnerabilities in TIFF and PCX Image Codecs Impact QNX Software Development PlatformEPSS 0.4%CVE-2026-45232LOWRsync < 3.4.3 Off-by-One Stack Write via HTTP ProxyEPSS 0.3%CVE-2026-79148CRITICALOff-by-one error in DevTools in Google Chrome prior to 152.0.7977.65 allowed a remote attacker leveraging social engineering to potentially EPSS 0.3%CVE-2021-3930—An off-by-one error was found in the SCSI device emulation in QEMU. It could occur while processing MODE SELECT commands in mode_sense_page(EPSS 0.3%CVE-2026-81738LOWOpenVPN 2.5.0 through 2.7.6 on Windows using the tap-windows6 driver allows attackers to trigger an out-of-bounds write via crafted DOMAIN-SEPSS 0.3%CVE-2026-45358MEDIUMImageMagick: Out-of-Bounds Read of a single byte in meta encoderEPSS 0.3%CVE-2026-44687LOWOff-by-one error in 'harden-below-nxdomain' logic can shadow a stub/forward zone by a legitimate parent's NXDOMAINEPSS 0.3%CVE-2026-58380HIGHGimp: gimp: stack buffer overflow in pnmscanner_gettoken()EPSS 0.3%CVE-2026-85454MEDIUMMOOS core-moos through 10.4.0 Off-by-One Buffer Overflow in Serial Telegram HandlingEPSS 0.3%CVE-2024-31585MEDIUMFFmpeg version n5.1 to n6.1 was discovered to contain an Off-by-one Error vulnerability in libavfilter/avf_showspectrum.c. This vulnerabilitEPSS 0.3%CVE-2024-23849MEDIUMIn rds_recv_track_latency in net/rds/af_rds.c in the Linux kernel through 6.7.1, there is an off-by-one error for an RDS_MSG_RX_DGRAM_TRACE_EPSS 0.3%CVE-2026-56790HIGHCANBoat - Off-by-One Global Buffer Overflow in searchForPgn()EPSS 0.3%CVE-2022-3103HIGHoff-by-one in io_uring module.EPSS 0.3%CVE-2025-52497MEDIUMMbed TLS before 3.6.4 has a PEM parsing one-byte heap-based buffer underflow, in mbedtls_pem_read_buffer and two mbedtls_pk_parse functions,EPSS 0.3%CVE-2025-37893HIGHLoongArch: BPF: Fix off-by-one error in build_prologue()EPSS 0.3%CVE-2026-14899HIGHOff-by-one out of bounds read in MIME header parser for forwardingEPSS 0.3%CVE-2022-49365MEDIUMdrm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()EPSS 0.3%CVE-2026-43860LOWmutt before 2.3.2 sometimes truncates the hash_passwd by one byte for IMAP auth_cram MD5 digest.EPSS 0.3%