Security Vulnerability Report
中文
CVE-2026-41499 CVSS 6.5 MEDIUM

CVE-2026-41499

Published: 2026-04-29 19:16:24
Last Modified: 2026-05-01 13:01:08

Description

Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 4.0.0 to before version 4.14.4, multiple heap-based out-of-bounds WRITE vulnerabilities exist in parse_uname_string() (remoted_op.c). This function processes OS identification data from agents and contains a dangerous code pattern that appears in 4 locations within the same function: writing to strlen(ptr) - 1 without checking for empty strings. When the string is empty, strlen() returns 0, and 0 - 1 wraps to SIZE_MAX due to unsigned integer underflow. Due to pointer arithmetic wrapping, SIZE_MAX effectively becomes -1, causing a write exactly 1 byte before the allocated buffer. This corrupts heap metadata (e.g., the chunk size field in glibc malloc), leading to heap corruption. This issue has been patched in version 4.14.4.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:* - VULNERABLE
Wazuh >= 4.0.0, < 4.14.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <stdio.h> #include <string.h> #include <stdlib.h> // PoC simulation of the vulnerable logic in Wazuh parse_uname_string() void trigger_vulnerability(char* input_string) { char* buffer = (char*)malloc(256); if (!buffer) return; printf("[+] Allocating buffer at: %p\n", buffer); // Vulnerable logic pattern found in remoted_op.c size_t len = strlen(input_string); printf("[+] Input string length: %zu\n", len); // If input_string is "", len is 0. // len - 1 becomes SIZE_MAX (unsigned integer underflow). // This writes to buffer[-1], corrupting heap metadata. buffer[len - 1] = 'X'; printf("[+] Write operation completed.\n"); free(buffer); // Likely to crash here due to heap corruption } int main() { printf("PoC for CVE-2026-41499: Wazuh Heap Overflow\n"); printf("Triggering the vulnerability with an empty string...\n"); // Sending an empty string triggers the underflow trigger_vulnerability(""); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41499", "sourceIdentifier": "[email protected]", "published": "2026-04-29T19:16:23.780", "lastModified": "2026-05-01T13:01:08.190", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 4.0.0 to before version 4.14.4, multiple heap-based out-of-bounds WRITE vulnerabilities exist in parse_uname_string() (remoted_op.c). This function processes OS identification data from agents and contains a dangerous code pattern that appears in 4 locations within the same function: writing to strlen(ptr) - 1 without checking for empty strings. When the string is empty, strlen() returns 0, and 0 - 1 wraps to SIZE_MAX due to unsigned integer underflow. Due to pointer arithmetic wrapping, SIZE_MAX effectively becomes -1, causing a write exactly 1 byte before the allocated buffer. This corrupts heap metadata (e.g., the chunk size field in glibc malloc), leading to heap corruption. This issue has been patched in version 4.14.4."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-124"}, {"lang": "en", "value": "CWE-191"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.0.0", "versionEndExcluding": "4.14.4", "matchCriteriaId": "8147D947-167A-4F70-A689-81B33A161A83"}]}]}], "references": [{"url": "https://github.com/wazuh/wazuh/releases/tag/v4.14.4", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/wazuh/wazuh/security/advisories/GHSA-qvqj-p8mm-r7h3", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/wazuh/wazuh/security/advisories/GHSA-qvqj-p8mm-r7h3", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Vendor Advisory"]}]}}