CVE-2026-25772
JSON

4.9medium

Wazuh Database Synchronization Vulnerable to Stack-based Buffer Overflow via snprintf Integer Underflow

Severity
4.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.36% (higher than 32% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

Wazuh is a free and open source platform used for threat prevention, detection, and response. Starting in version 4.4.0 and prior to version 4.14.3, a stack-based buffer overflow vulnerability exists in the Wazuh Database synchronization module (`wdb_delta_event.c`). The SQL query construction logic allows for an integer underflow when calculating the remaining buffer size. This occurs because the code incorrectly aggregates the return value of `snprintf`. If a specific database synchronization payload exceeds the size of the query buffer (2048 bytes), the size calculation wraps around to a massive integer, effectively removing bounds checking for subsequent writes. This allows an attacker to corrupt the stack, leading to a Denial of Service (DoS) or potentially RCE. Version 4.14.3 fixes the issue.

Affected

Product or packageVersionsReported by
wazuh wazuh>= 4.4.0, < 4.14.3, from 4.4.0 before 4.14.3CVE List, NVD

All scores

GitHub_M4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
NVD7.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-121CWE-191

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Wazuh is a free and open source platform used for threat prevention, detection, and response. Starting in version 4.4.0 and prior to version 4.14.3, a stack-based buffer overflow vulnerability exists in the Wazuh Database synchronization module (`wdb_delta_event.c`). The SQL query construction logic allows for an integer underflow when calculating the remaining buffer size. This occurs because the code incorrectly aggregates the return value of `snprintf`. If a specific database synchronization payload exceeds the size of the query buffer (2048 bytes), the size calculation wraps around to a massive integer, effectively removing bounds checking for subsequent writes. This allows an attacker to corrupt the stack, leading to a Denial of Service (DoS) or potentially RCE. Version 4.14.3 fixes the issue.

NVD (es)

Wazuh es una plataforma de código abierto y gratuita utilizada para la prevención, detección y respuesta ante amenazas. A partir de la versión 4.4.0 y antes de la versión 4.14.3, existe una vulnerabilidad de desbordamiento de búfer basado en pila en el módulo de sincronización de la base de datos de Wazuh ('wdb_delta_event.c'). La lógica de construcción de consultas SQL permite un desbordamiento negativo de enteros al calcular el tamaño restante del búfer. Esto ocurre porque el código agrega incorrectamente el valor de retorno de `snprintf`. Si una carga útil de sincronización de base de datos específica excede el tamaño del búfer de consulta (2048 bytes), el cálculo del tamaño se desborda a un entero masivo, eliminando efectivamente la verificación de límites para escrituras posteriores. Esto permite a un atacante corromper la pila, lo que lleva a una denegación de servicio (DoS) o potencialmente a RCE. La versión 4.14.3 corrige el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-25772 changed 2026-03-17CVE Terms of Use
NVDCVE-2026-25772 changed 2026-06-17Public domain