Weaknesses of type CWE-170

57 results

Terminação inadequada de string nula

Fraqueza onde uma string não é terminada com o byte nulo (\0), causando buffer overread ou comportamento indefinido quando funções esperam strings válidas. Código que não garante o caractere terminador deixa a porta aberta para leitura além dos limites alocados ou processamento de dados lixo.

Example

Um programa copia dados em um buffer de 10 bytes com strncpy(buffer, entrada, 10) mas nunca adiciona buffer[10] = '\0'. Quando strlen(buffer) é chamado, a função procura pelo \0 além dos 10 bytes, lendo memória não autorizada até encontrar um nulo aleatório.

How to mitigate

Sempre termine strings explicitamente após cópia (buffer[tamanho-1] = '\0') ou use funções seguras como snprintf() que garantem terminação automática. Valide comprimentos de entrada e use ferramentas estáticas (ASan, Clang) para detectar overreads em desenvolvimento.

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%