Falhas do tipo CWE-158

37 resultados

Neutralização inadequada de byte nulo ou caractere NUL

Ocorre quando uma aplicação não trata corretamente o caractere nulo (\0) em strings ou dados de entrada, permitindo que um atacante encerre strings prematuramente ou contorne validações. O código assume que a string termina naturalmente, mas o byte nulo força uma interrupção inesperada, levando a comportamentos não previstos como bypass de filtros, path traversal ou injeção de código.

Exemplo

Um validador verifica se o arquivo tem extensão .txt, mas um atacante envia 'malware.exe\0.txt'. A aplicação valida e aceita (vê '.txt'), mas sistemas de baixo nível interpretam a string como 'malware.exe' (terminada no nulo), executando o executável. Ou um filtro de XSS falha porque o byte nulo quebra a análise da string antes de detectar o payload malicioso.

Como mitigar

Sempre validar e sanitizar entrada do usuário, removendo ou rejeitando bytes nulos explicitamente antes de qualquer processamento. Use APIs seguras de parsing que tratam nulos como inválidos, implemente whitelist rigorosa de caracteres permitidos e teste casos extremos como strings com nulos inseridos no meio ou fim.

CVE-2024-0408MEDIUMXorg-x11-server: selinux unlabeled glx pbufferEPSS 0.3%CVE-2025-55113CRITICALBMC Control-M/Agent unescaped NULL byte in access control list checksEPSS 0.3%CVE-2026-115473MEDIUMMongoose: Heap OOB reads and null-byte bypass in mg_path_is_sane (util.c)EPSS 0.3%CVE-2026-116566MEDIUMsocket.getaddrinfo() accepts embedded null bytes in host and portEPSS 0.3%CVE-2026-118767MEDIUMBotan: Python binding bcrypt APIs truncate passwords containing embedded NULsEPSS 0.2%CVE-2026-47778MEDIUMEnvoy: Embedded NUL in TLS DNS SAN Truncation in the Default TLS Certificate Validator. (Auth Bypass)EPSS 0.2%CVE-2026-4359LOWHeap-buffer-over-read in _mongoc_http_send via strstr on non-null-terminated bufferEPSS 0.2%CVE-2022-31223LOWDell BIOS versions contain an Improper Neutralization of Null Byte vulnerability. A local authenticated administrator user could potentiallyEPSS 0.2%CVE-2026-43861LOWmutt before 2.3.2 does not check for '\0' in url_pct_decode.EPSS 0.2%CVE-2026-43859LOWmutt before 2.3.2 sometimes uses strfcpy instead of memcpy for the IMAP auth_cram MD5 digest.EPSS 0.2%CVE-2026-41256MEDIUMjq: Embedded NUL truncates top-level jq programs loaded with -fEPSS 0.2%CVE-2026-43895MEDIUMjq: Embedded NUL in jq import paths causes local redaction-policy bypass and preserves sensitive fields in published artifactsEPSS 0.2%CVE-2026-84790HIGHOpenVPN 2.7_alpha1 through 2.7.7 allows remote authenticated users to impersonate others via a crafted certificate subject fieldEPSS 0.1%CVE-2026-70603MEDIUMElectron: shell.openPath path validation bypass via embedded null byteEPSS 0.1%CVE-2026-92705HIGHAegisub executes arbitrary code through automatically loaded Automation scriptsEPSS 0.1%CVE-2025-61985LOWssh in OpenSSH before 10.1 allows the '\0' character in an ssh:// URI, potentially leading to code execution when a ProxyCommand is used.EPSS 0.1%CVE-2026-28540MEDIUMOut-of-bounds character read vulnerability in Bluetooth. Impact: Successful exploitation of this vulnerability may affect service confidentiEPSS 0.1%