Description
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.
Published: 2026-04-29
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw is a stack-based buffer overflow triggered when wazuh-remoted formats attacker-controlled bytes using sprintf; the signed char promotion causes an 8-character string to be written into a 2-byte slot, corrupting the stack and potentially allowing arbitrary code execution or a crash. In addition, the same diagnostic path logs a full hex dump of the attacker-controlled data to /var/ossec/logs/ossec.log for each oversized message, enabling a remote log amplification that can consume disk space and I/O while degrading monitoring fidelity.

Affected Systems

Wazuh versions from 4.8.0 up to but not including 4.14.4 are vulnerable. The affected binary is wazuh-remoted, which listens on TCP port 1514 for syslog messages. The fix was applied in release 4.14.4.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity. The EPSS score is not available, so the likelihood of exploitation cannot be quantified. The vulnerability is not recorded in the CISA KEV catalog. The stack overflow and log amplification are reachable remotely without authentication—an attacker only needs to send an oversized length‑prefixed message to port 1514, making the attack surface directly exposed to the network. While the description does not confirm exploitation beyond stack corruption, the potential for code execution or denial of service warrants serious concern for affected deployments.

Generated by OpenCVE AI on April 30, 2026 at 03:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Wazuh 4.14.4 or later, which removes the vulnerable sprintf usage.
  • Limit exposure of TCP port 1514 to trusted hosts or networks using firewalls or access control lists.
  • Implement strict input validation by rejecting oversized packets before reaching the diagnostic path to mitigate stack overflow (CWE‑121) and prevent log amplification (CWE‑400).
  • Reduce or disable logging of attacker‑controlled hex dumps to prevent disk I/O strain and monitoring degradation.

Generated by OpenCVE AI on April 30, 2026 at 03:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 30 Apr 2026 20:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:*

Wed, 29 Apr 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Wazuh
Wazuh wazuh
Vendors & Products Wazuh
Wazuh wazuh

Wed, 29 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 29 Apr 2026 18:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Wazuh: Pre-auth stack-based buffer overflow in wazuh-remoted print_hex_string() due to signed char promotion on x86_64
Weaknesses CWE-121
CWE-400
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-29T18:34:59.895Z

Reserved: 2026-02-25T15:28:40.650Z

Link: CVE-2026-28221

cve-icon Vulnrichment

Updated: 2026-04-29T18:34:50.695Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-29T19:16:23.047

Modified: 2026-04-30T20:34:42.827

Link: CVE-2026-28221

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-30T04:00:15Z

Weaknesses