/

CVE-2026-44901

Severity:

HIGH RISK

(8.4)

Unsafe Deserialization (CWE-502) in Wazuh Cluster

CVE-2026-44901

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution with Root Privileges

Severity:

HIGH RISK

(8.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity unsafe deserialization vulnerability in Wazuh allows a compromised cluster worker to influence how the master processes distributed API responses. By controlling a response type name and associated data, an attacker may cause the master to execute Python code with root privileges when results from multiple nodes are merged.

Affected context

The vulnerability occurs in Wazuh distributed API deployments that merge responses from cluster workers and trust the sort_casting field supplied in worker JSON responses. Risk is present when a worker is compromised or otherwise able to return manipulated response data, and when the master processes results from multiple nodes using the affected merge logic.

Exploit preconditions

  • Attack surface: Distributed Wazuh API response processing between cluster workers and the master
  • Required access: Control of, or code execution on, a cluster worker capable of returning crafted JSON data
  • Trigger point: Merging responses from multiple nodes through AffectedItemsWazuhResult.merge()
  • Why exploitation is possible: The master resolves attacker-controlled type names through Python builtins without an allowlist, allowing a dangerous callable to process attacker-controlled source data

Why this happens

The underlying flaw is unsafe deserialization and dynamic callable resolution from untrusted structured data. The merge routine trusts the worker-provided sort_casting value and resolves it through Python builtins rather than restricting it to a fixed set of safe conversion types. This behavior maps to CWE-502: Unsafe Deserialization, because data received from a cluster peer can influence object or callable behavior during processing instead of remaining inert data.

Potential impact

  • The Wazuh master may execute attacker-controlled Python code
  • Commands may run with the privileges of the master process, potentially including root
  • Confidential security data and configuration may be exposed
  • Monitoring, detection, and response functions could be disrupted
  • The affected deployment could be used to reach other systems or cluster components

General mitigation guidance

Mitigation generally focuses on treating cluster responses as untrusted input and removing dynamic execution behavior from data-processing paths.

Common defensive patterns include:

  • Restricting type and callable resolution to an explicit, minimal allowlist
  • Replacing dynamic builtin lookup with fixed internal conversion routines
  • Validating response schemas and field values before distributed result merging
  • Separating data parsing from executable behavior
  • Protecting cluster authentication and worker integrity so compromised nodes cannot submit trusted-looking responses
  • Running master services with the least privileges necessary and applying isolation boundaries where practical
  • Monitoring for unauthorized worker changes and unexpected inter-node API behavior

How teams detect issues like this

Organizations can look for this vulnerability class through:

  • Static analysis rules that flag builtin lookup, reflection, or callable resolution based on network-controlled fields
  • Code review checks for deserialization or response-merging logic that accepts type names from remote peers
  • Tests using unexpected, unsupported, or dangerous type identifiers in cluster response fields
  • Schema and policy enforcement that rejects values outside an explicit conversion allowlist
  • Runtime monitoring for abnormal master process execution, unexpected child processes, or unusual worker-to-master response patterns
  • Automated security review tools that identify dynamic execution and unsafe deserialization patterns

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/commit/b29849f8abb08d78f257e6106b6111a8a1b0e621
github.comgithub.com/wazuh/wazuh/pull/35757
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.6
github.comgithub.com/wazuh/wazuh/releases/tag/v5.0.0-beta2
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-8c6v-7g3w-prrq

Frequently asked

questions

Exploitability depends on deployment exposure and cluster security. The attacker generally needs control of, or code execution on, a worker that can return manipulated responses to the master.

No. The critical prerequisite is influence over a participating worker response. Once the master processes the malicious data, the resulting code execution occurs in the master's security context.

Treat all cluster response fields as untrusted, validate them against a strict schema, and replace dynamic builtin resolution with a small explicit allowlist of safe operations.

Protect worker integrity, minimize master privileges, test distributed parsing logic with adversarial inputs, and enforce review policies against reflection or executable behavior driven by remote data.

Find out what's already
exploitable in your codebase.