Falhas do tipo CWE-170

52 resultados

Terminação inadequada com null em strings

A fraqueza ocorre quando uma string ou buffer não é finalizado corretamente com o caractere nulo ('\0'), esperado pelas funções padrão C/C++. Funções como strcpy(), strlen() ou printf() dependem desse terminador para saber onde a string termina; sem ele, elas leem além dos limites do buffer, causando vazamento de informação, corrupção de memória ou crash.

Exemplo

Um código copia dados de entrada para um buffer com strncpy(dst, src, size) sem garantir que dst[size] = '\0' depois, ou usa memcpy() para preencher um buffer e depois passa o resultado a strlen(), que segue lendo lixo em memória até encontrar um null por acaso ou causar segmentation fault.

Como mitigar

Sempre finalize strings com null explicitamente após operações de cópia ou manipulação de buffers; prefira funções seguras como strlcpy(), snprintf() ou APIs de linguagens mais modernas que gerenciam terminação automaticamente; valide o tamanho de dados de entrada antes de copiá-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-5067CRITICALOut-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-KeyEPSS 0.6%CVE-2026-55738HIGHStack Buffer Overflow in rxi/microtar raw_to_header() via non-null-terminated TAR name fieldEPSS 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-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-2026-8721CRITICALCrypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLsEPSS 0.4%CVE-2025-61912MEDIUMpython-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null TerminationEPSS 0.4%CVE-2025-62792MEDIUMWazuh vulnerable to Heap-based Buffer Over-read in w_expression_matchEPSS 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-2024-31197MEDIUMImproper Null Termination in libfluid_msg libraryEPSS 0.3%CVE-2024-45288HIGHMultiple vulnerabilities in libnvEPSS 0.3%CVE-2025-67790CRITICALAn issue was discovered in DriveLock 24.1 before 24.1.6, 24.2 before 24.2.7, and 25.1 before 25.1.5. An unprivileged user could cause occasiEPSS 0.3%CVE-2026-33948LOWjq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed InputEPSS 0.3%