Stack-based Buffer Overflow Affecting wazuh/wazuh package, versions [3.9.0, 4.14.3)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.39% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-WAZUHWAZUH-15812248
  • published29 Mar 2026
  • disclosed17 Mar 2026
  • creditUnknown

Introduced: 17 Mar 2026

CVE-2026-25790  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade wazuh/wazuh to version 4.14.3 or higher.

Overview

Affected versions of this package are vulnerable to Stack-based Buffer Overflow through the FillScanInfo and FillCheckEventInfo JSON parsing functions in src/analysisd/decoders/security_configuration_assessment.c. An attacker can crash the Wazuh manager by sending a specially crafted SCA JSON event containing floating-point values that expand beyond the fixed 128-byte stack buffer.

PoC

#include <stdio.h>
#include <string.h>

#define OS_SIZE_128 128

/**
 * This function isolates the vulnerable code pattern.
 */
void vulnerable_function(double bad_double) {
    char value[OS_SIZE_128]; // The 128-byte stack buffer

    printf("Attempting to write to buffer...\n");
    
    // This is the vulnerable call.
    // %lf will try to print a "1" followed by 150 zeros.
    sprintf(value, "%lf", bad_double);

    printf("Buffer write complete. (You shouldn't see this!)\n");
}

int main() {
    // This valid double's string representation is > 128 bytes.
    double overflow_payload = 1.0e150; 

    printf("Starting harness...\n");
    vulnerable_function(overflow_payload);
    printf("Harness finished.\n");

    return 0;
}

CVSS Base Scores

version 4.0
version 3.1