CVE-2025-24016
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.9.1, an unsafe deserialization vulnerability allows for remote code execution on Wazuh servers. DistributedAPI parameters are a serialized as JSON and deserialized using `as_wazuh_object` (in `framework/wazuh/core/cluster/common.py`). If an attacker manages to inject an unsanitized dictionary in DAPI request/response, they can forge an unhandled exception (`__unhandled_exc__`) to evaluate arbitrary python code. The vulnerability can be triggered by anybody with API access (compromised dashboard or Wazuh servers in the cluster) or, in certain configurations, even by a compromised agent. Version 4.9.1 contains a fix.
Summary dbcve.org
Wazuh versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI framework (framework/wazuh/core/cluster/common.py). The as_wazuh_object function deserializes JSON parameters without sanitization, allowing attackers with API access to inject a forged __unhandled_exc__ dictionary that triggers arbitrary Python code execution. In some configurations, compromised agents can also trigger this.
Mitigation
Immediately upgrade Wazuh to version 4.9.1 or later. Additionally, restrict API access to trusted IPs, implement strong authentication, and monitor for unusual DAPI requests as a defense-in-depth measure until patching is complete.