{"id":"CVE-2026-28221","aliases":["CVE-2026-28221"],"related":[],"kind":"vulnerability","state":"published","title":"Wazuh: Pre-auth stack-based buffer overflow in wazuh-remoted print_hex_string() due to signed char promotion on x86_64","summary":"Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 4.8.0 to before version 4.14.4, a stack-based buffer overflow exists in print_hex_string() in wazuh-remoted. The bug is triggered when formatting attacker-controlled bytes using sprintf(dst_buf + 2*i, \"%.2x\", src_buf[i]) on platforms where char is treated as signed and the compiled code sign-extends bytes before the variadic call. For input bytes such as 0xFF, the formatting can emit \"ffffffff\" (8 chars) instead of \"ff\" (2 chars), causing an out-of-bounds write past a fixed 2049-byte stack buffer. The vulnerable path is reachable remotely prior to any agent authentication/registration logic via TCP/1514 when an oversized length prefix causes the “unexpected message (hex)” diagnostic path to run. Additionally, the same unauthenticated oversized-message diagnostic path logs an attacker-controlled hex dump to /var/ossec/logs/ossec.log for each trigger, allowing remote log amplification that can degrade monitoring fidelity and consume disk/I/O. This log amplification is reachable even without triggering the sign-extension overflow (e.g., using bytes < 0x80). This issue has been patched in version 4.14.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 4.8.0 to before version 4.14.4, a stack-based buffer overflow exists in print_hex_string() in wazuh-remoted. The bug is triggered when formatting attacker-controlled bytes using sprintf(dst_buf + 2*i, \"%.2x\", src_buf[i]) on platforms where char is treated as signed and the compiled code sign-extends bytes before the variadic call. For input bytes such as 0xFF, the formatting can emit \"ffffffff\" (8 chars) instead of \"ff\" (2 chars), causing an out-of-bounds write past a fixed 2049-byte stack buffer. The vulnerable path is reachable remotely prior to any agent authentication/registration logic via TCP/1514 when an oversized length prefix causes the “unexpected message (hex)” diagnostic path to run. Additionally, the same unauthenticated oversized-message diagnostic path logs an attacker-controlled hex dump to /var/ossec/logs/ossec.log for each trigger, allowing remote log amplification that can degrade monitoring fidelity and consume disk/I/O. This log amplification is reachable even without triggering the sign-extension overflow (e.g., using bytes < 0x80). This issue has been patched in version 4.14.4.","source":"cvelist"},{"lang":"es","text":"Wazuh es una plataforma de código abierto y gratuita utilizada para la prevención, detección y respuesta a amenazas. Desde la versión 4.8.0 hasta antes de la versión 4.14.4, existe un desbordamiento de búfer basado en pila en print_hex_string() en wazuh-remoted. El error se activa al formatear bytes controlados por el atacante usando sprintf(dst_buf + 2i, ’%.2x’, src_buf[i]) en plataformas donde char se trata como con signo y el código compilado extiende el signo de los bytes antes de la llamada variádica. Para bytes de entrada como 0xFF, el formateo puede emitir ’ffffffff’ (8 caracteres) en lugar de ’ff’ (2 caracteres), causando una escritura fuera de límites más allá de un búfer de pila fijo de 2049 bytes. La ruta vulnerable es accesible de forma remota antes de cualquier lógica de autenticación/registro del agente a través de TCP/1514 cuando un prefijo de longitud excesiva hace que se ejecute la ruta de diagnóstico ’mensaje inesperado (hex)’. Además, la misma ruta de diagnóstico de mensaje excesivo no autenticado registra un volcado hexadecimal controlado por el atacante en /var/ossec/logs/ossec.log por cada activación, lo que permite la amplificación remota de registros que puede degradar la fidelidad del monitoreo y consumir disco/E/S. Esta amplificación de registros es accesible incluso sin activar el desbordamiento por extensión de signo (p. ej., usando bytes menor que 0x80). Este problema ha sido parcheado en la versión 4.14.4.","source":"nvd"}],"published":"2026-04-29T17:53:15.374Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H","score":8.2,"rating":"HIGH"}],"cwes":["CWE-121","CWE-400"],"affected":[{"ranges":[{"version":">= 4.8.0, < 4.14.4","status":"affected"}],"vendor":"wazuh","product":"wazuh","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.8.0","fixed":"4.14.4"}],"vendor":"wazuh","product":"wazuh","cpe":"cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/wazuh/wazuh/security/advisories/GHSA-q9vv-7w4c-f4cm","tags":["exploit","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/wazuh/wazuh/releases/tag/v4.14.4","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-29T18:34:55.716Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-28221","url":"https://www.cve.org/CVERecord?id=CVE-2026-28221","licence":"CVE Terms of Use","modified":"2026-04-29T18:34:59.895Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-28221","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28221","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.247Z","epss":{"score":0.00397,"percentile":0.36056,"date":"2026-12-01T12:00:22.000Z"}}