CVE-2026-41499
Heap Out-of-Bounds Write in Wazuh Agent OS Parsing
Publication date: 2026-04-29
Last updated on: 2026-05-01
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wazuh | wazuh | From 4.0.0 (inc) to 4.14.4 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-124 | The product writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer. |
| CWE-191 | The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.
Can you explain this vulnerability to me?
This vulnerability exists in Wazuh versions from 4.0.0 up to but not including 4.14.4, specifically in the parse_uname_string() function within remoted_op.c. The function processes OS identification data from agents and contains a dangerous code pattern where it writes to strlen(ptr) - 1 without checking if the string is empty.
If the string is empty, strlen() returns 0, and subtracting 1 causes an unsigned integer underflow, wrapping to SIZE_MAX. This results in a write occurring one byte before the allocated buffer, corrupting heap metadata such as the chunk size field used by glibc malloc. This heap corruption can lead to unstable behavior or exploitation.
The issue was fixed in Wazuh version 4.14.4.
How can this vulnerability impact me? :
This vulnerability can lead to heap corruption due to out-of-bounds writes occurring before the allocated buffer. Heap corruption can cause application crashes, instability, or potentially allow an attacker to execute arbitrary code or escalate privileges.
Since the vulnerability affects a component that processes OS identification data from agents, an attacker who can control or influence this input might exploit the flaw to compromise the Wazuh system.
The CVSS v3.1 base score is 6.5, indicating a medium severity with network attack vector, low attack complexity, requiring low privileges, no user interaction, and impacting availability.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade Wazuh to version 4.14.4 or later, where the heap-based out-of-bounds write issue in parse_uname_string() has been patched.
Can you explain this vulnerability to me?
CVE-2026-41499 is a heap-based out-of-bounds write vulnerability in the Wazuh manager's parse_uname_string() function. This function processes OS identification data from agents. The vulnerability occurs because the code writes to strlen(ptr) - 1 without checking if the string is empty. When the string is empty, strlen() returns 0, and subtracting 1 causes an unsigned integer underflow, wrapping to SIZE_MAX. This results in a write one byte before the allocated buffer, corrupting heap metadata such as the chunk size field used by glibc malloc.
This issue appears in four locations within the same function, affecting parsing of Linux OS version, codename, name, and Windows version. The vulnerability can be triggered by sending malformed agent OS identification data through keep-alive messages, potentially causing heap corruption or crashes.
The vulnerability has been patched in Wazuh version 4.14.4 by adding length checks before all strlen() - 1 operations to ensure the string is not empty before writing.
How can this vulnerability impact me? :
This vulnerability can lead to heap corruption by writing outside the bounds of allocated memory. Such corruption can cause the Wazuh manager to crash, resulting in denial of service.
Because the flaw is exploitable via network-accessible agent keep-alive messages, an attacker who can send crafted data (for example, a compromised agent or a man-in-the-middle attacker) could trigger this vulnerability.
While the CVSS score rates the impact as moderate with high availability impact, exploitation for arbitrary code execution is limited. The primary impact is service disruption and potential instability of the Wazuh manager.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability manifests when the Wazuh manager processes malformed agent OS identification data, specifically in the parse_uname_string() function. Detection involves monitoring for crashes or heap corruption symptoms triggered by malformed keep-alive messages from agents.
Since the vulnerability is triggered by crafted keep-alive messages, network monitoring tools can be used to inspect agent communication for unusual or malformed uname data.
No specific detection commands are provided in the resources, but general approaches include:
- Monitoring Wazuh manager logs for crashes or heap corruption errors.
- Using network packet capture tools (e.g., tcpdump, Wireshark) to analyze agent keep-alive messages for malformed OS identification strings.
- Checking the Wazuh manager version to identify if it is below 4.14.4, which is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade the Wazuh manager to version 4.14.4 or later, where the vulnerability has been patched by adding proper length checks before writing operations.
Until the upgrade can be applied, consider restricting or monitoring agent communications to prevent malformed keep-alive messages from reaching the manager.
Additionally, review and apply any relevant security advisories and updates from Wazuh to ensure all components are protected.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability occurs when the Wazuh manager processes malformed agent OS identification data, specifically in the parse_uname_string() function. Detection involves monitoring for abnormal crashes or heap corruption in the Wazuh manager process, which may indicate exploitation attempts.
Since the vulnerability is triggered by malformed keep-alive messages from agents, network monitoring for unusual or malformed agent communication packets could help detect attempts to exploit this issue.
There are no explicit detection commands provided in the resources, but general approaches include:
- Checking Wazuh manager logs for crashes or heap corruption errors.
- Using network packet capture tools (e.g., tcpdump or Wireshark) to inspect agent keep-alive messages for malformed OS identification data.
- Verifying the Wazuh manager version to ensure it is patched (version 4.14.4 or later) to prevent exploitation.
Example commands that could assist in detection:
- Check Wazuh manager version: `wazuh-manager -v` or check package version via your package manager.
- Monitor Wazuh manager logs for crashes or heap corruption messages: `grep -i 'heap corruption' /var/ossec/logs/ossec.log`
- Capture and analyze network traffic on the Wazuh manager port (default 1514 UDP/TCP): `tcpdump -i eth0 port 1514 -w capture.pcap` and analyze with Wireshark for malformed agent messages.