Fallos del tipo CWE-170

57 resultados

Terminação inadequada com nulo

Ocorre quando uma string ou buffer não é finalizado com o caractere nulo ('\0'), violando a convenção de strings em C/C++. Funções de manipulação de strings esperam encontrar esse terminador para saber onde a string acaba; sem ele, leem além dos limites da memória alocada, causando vazamento de dados ou corrupção.

Ejemplo

Um desenvolvedor copia dados para um buffer com strncpy() mas esquece de adicionar o nulo no final: char buf[10]; strncpy(buf, entrada, 10); — agora buf não é uma string válida, e strcmp() ou printf() vão ler memória aleatória até achar um nulo por acaso.

Cómo mitigar

Use sempre funções seguras (strlcpy, snprintf) que garantem o terminador nulo, ou adicione manualmente buf[tamanho_cópia] = '\0' após copiar dados. Em validação, sempre sanitize entrada garantindo que buffers destinados a strings sejam nulos-terminados antes de usá-los.

CVE-2021-1418CRITICALCisco Jabber Desktop and Mobile Client Software VulnerabilitiesEPSS 0.9%CVE-2023-24021HIGHIncorrect handling of '\0' bytes in file uploads in ModSecurity before 2.9.7 may allow for Web Application Firewall bypasses and buffer overEPSS 0.9%CVE-2024-21442HIGHWindows USB Print Driver Elevation of Privilege VulnerabilityEPSS 0.8%CVE-2026-70587HIGHWindows Remote Desktop Protocol Information Disclosure VulnerabilityEPSS 0.8%CVE-2026-5067CRITICALOut-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-KeyEPSS 0.6%CVE-2020-14323MEDIUMA null pointer dereference flaw was found in samba's Winbind service in versions before 4.11.15, before 4.12.9 and before 4.13.1. A local usEPSS 0.6%CVE-2025-67733HIGHValkey Affected by RESP Protocol Injection via Lua error_replyEPSS 0.6%CVE-2023-28263MEDIUMVisual Studio Information Disclosure VulnerabilityEPSS 0.6%CVE-2026-78506MEDIUMMicrosoft Office Word Information Disclosure VulnerabilityEPSS 0.5%CVE-2026-45798HIGHWazuh: Pre-auth stack-buffer-overflow in compare_wazuh_versions reachable from wazuh-authd (TCP/1515) via crafted enrollment V: fieldEPSS 0.5%CVE-2023-48674MEDIUMDell Platform BIOS contains an Improper Null Termination vulnerability. A high privilege user with network access to the system could potentEPSS 0.5%CVE-2026-2239LOWGimp: gimp: application crash (dos) via crafted psd file due to heap-buffer-overflowEPSS 0.5%CVE-2026-34032MEDIUMApache HTTP Server: mod_proxy_ajp: Heap Buffer Over-Read Due to Missing Null-Termination Check (ajp_msg_get_string)EPSS 0.5%CVE-2024-31484HIGHA vulnerability has been identified in CPC80 Central Processing/Communication (All versions < V16.41), CPCI85 Central Processing/CommunicatiEPSS 0.5%CVE-2025-61912MEDIUMpython-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null TerminationEPSS 0.5%CVE-2026-8721CRITICALCrypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLsEPSS 0.4%CVE-2026-44452MEDIUMh2o is vulnerable to heap overrunEPSS 0.4%CVE-2025-2026HIGHThe NPort 6100-G2/6200-G2 Series is affected by a high-severity vulnerability (CVE-2025-2026) that allows remote attackers to execute a nullEPSS 0.4%CVE-2026-55738HIGHStack Buffer Overflow in rxi/microtar raw_to_header() via non-null-terminated TAR name fieldEPSS 0.4%CVE-2025-62792MEDIUMWazuh vulnerable to Heap-based Buffer Over-read in w_expression_matchEPSS 0.4%