CVE-2026-25769: Wazuh cluster insecure deserialization lets a compromised worker execute commands on the master node
Hakai Security Research Team disclosed CVE-2026-25769, an RCE flaw from insecure deserialization (CWE-502) in the cluster protocol of Wazuh up to version 4.14.1. A compromised worker node can run arbitrary commands on the master node. The researchers reported it through the GitHub Security Advisory program, and the Wazuh team acknowledged it and assigned the CVE. The article does not report exploitation in the wild. The impact is serious because the master holds security logs, agent configurations and detection rules, and can control agents, so a compromise could enable tampering with monitoring data and lateral movement.
Technical Details
- The flaw is in
as_wazuh_object()inframework/wazuh/core/cluster/common.py. This function is theobject_hookforjson.loads()and handles messages between cluster nodes. - For JSON objects with a
__callable__key, it reads__module__from attacker-controlled input, callsimport_module()with no whitelist, and resolves the function withgetattr(). dapi.pythen runs the returned function with attacker-supplied kwargs, inrun_local()asf(**f_kwargs).- Attack flow: the compromised worker sends a malicious DAPI request through
LocalClient.execute(). The request is encrypted with the cluster Fernet key and sent over TCP to master port 1516. The master deserializes{"__callable__": {"__name__": "getoutput", "__module__": "subprocess"}}and runssubprocess.getoutputwith an attacker-chosen command. - Prerequisites are access to a compromised worker, which already holds the cluster key and network reach to the master. The PoC wrote
/tmp/RCE_PROOFas the wazuh user (uid 999, group root) on the master. - Root causes: the cluster design implicitly trusts authenticated nodes, with no module whitelist, no content validation and no sandboxing. The PoC lab used Wazuh manager Docker images 4.9.2.
Remediation
- Upgrade Wazuh to the latest released version that contains the fix.
- Apply least privilege to the Wazuh service so it has only the access it needs.
- Protect worker nodes and the cluster key, since a compromised worker is the exploitation prerequisite.
Linha do tempo
-
CVE-2026-25769: Wazuh cluster insecure deserialization lets a compromised worker execute commands on the master node
ler a análise desta fonte ocultar
Hakai Security Research Team disclosed CVE-2026-25769, an RCE flaw from insecure deserialization (CWE-502) in the cluster protocol of Wazuh up to version 4.14.1. A compromised worker node can run arbitrary commands on the master node. The researchers reported it through the GitHub Security Advisory program, and the Wazuh team acknowledged it and assigned the CVE. The article does not report exploitation in the wild. The impact is serious because the master holds security logs, agent configurations and detection rules, and can control agents, so a compromise could enable tampering with monitoring data and lateral movement.
Technical Details
- The flaw is in
as_wazuh_object()inframework/wazuh/core/cluster/common.py. This function is theobject_hookforjson.loads()and handles messages between cluster nodes. - For JSON objects with a
__callable__key, it reads__module__from attacker-controlled input, callsimport_module()with no whitelist, and resolves the function withgetattr(). dapi.pythen runs the returned function with attacker-supplied kwargs, inrun_local()asf(**f_kwargs).- Attack flow: the compromised worker sends a malicious DAPI request through
LocalClient.execute(). The request is encrypted with the cluster Fernet key and sent over TCP to master port 1516. The master deserializes{"__callable__": {"__name__": "getoutput", "__module__": "subprocess"}}and runssubprocess.getoutputwith an attacker-chosen command. - Prerequisites are access to a compromised worker, which already holds the cluster key and network reach to the master. The PoC wrote
/tmp/RCE_PROOFas the wazuh user (uid 999, group root) on the master. - Root causes: the cluster design implicitly trusts authenticated nodes, with no module whitelist, no content validation and no sandboxing. The PoC lab used Wazuh manager Docker images 4.9.2.
Remediation
- Upgrade Wazuh to the latest released version that contains the fix.
- Apply least privilege to the Wazuh service so it has only the access it needs.
- Protect worker nodes and the cluster key, since a compromised worker is the exploitation prerequisite.
- The flaw is in