Unsafe Deserialization RCE in Wazuh DistributedAPI
CVE-2025-24016 is a critical unsafe deserialization vulnerability in Wazuh Server affecting versions 4.4.0 through 4.9.0 (fixed in 4.9.1). DistributedAPI (DAPI) parameters are serialized as JSON and deserialized via the as_wazuh_object function in framework/wazuh/core/cluster/common.py. If an attacker can inject an unsanitized dictionary into a DAPI request or response, they can forge an unhandled exception object (__unhandled_exc__) that results in evaluation of arbitrary Python code. This leads to remote code execution on the Wazuh server. The issue can be triggered by an actor with API access, including via a compromised dashboard or another Wazuh server in the cluster, and in certain configurations may also be reachable from a compromised agent.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
__unhandled_exc__ objects, shell downloader execution, and anomalous child processes from Wazuh components. Increase detection and incident response monitoring around Wazuh servers and connected agents until patching is completed.Remediation
Patch, then assume compromise.
Exploits
5 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).
This repository provides a working proof-of-concept (PoC) exploit for CVE-2025-24016, a remote code execution (RCE) vulnerability in Wazuh server versions 4.4.0 through 4.9.0. The exploit leverages unsafe deserialization in the Wazuh DistributedAPI, specifically targeting the '/security/user/authenticate/run_as' endpoint. The main script, 'CVE-2025-24016.py', is a Python tool that takes the target URL, attacker's IP (LHOST), and port (LPORT) as arguments, along with optional authentication credentials (defaulting to 'wazuh-wui:MyS3cr37P450r.*-'). It crafts a malicious JSON payload that abuses the '__unhandled_exc__' deserialization to execute arbitrary Python code on the server, resulting in a reverse shell connection back to the attacker's machine. The exploit requires valid API credentials and network access to the Wazuh server's API endpoint. The repository also includes a README.md with detailed vulnerability explanation, usage instructions, and a sample Burp Suite request. The code is a functional PoC and does not include advanced features or payload customization, but demonstrates the vulnerability's impact clearly.
This repository contains a single Python exploit script (CVE-2025-24016.py) and a brief README. The exploit targets Wazuh version 8.4, specifically exploiting CVE-2025-24016, a remote code execution (RCE) vulnerability. The script requires the attacker to provide the target URL (typically https://<worker-server>:55000/security/user/authenticate/run_as), the attacker's IP (LHOST), and port (LPORT) for the reverse shell. Optional arguments include authentication credentials (defaulting to 'wazuh-wui' and 'MyS3cr37P450r.*-'), proxy usage, and configuration file path. The exploit works by sending a crafted JSON payload to the Wazuh server's authentication endpoint, abusing deserialization to trigger os.system and execute a bash reverse shell command. If successful, the Wazuh server connects back to the attacker's machine, providing a shell. The script includes input validation, logging, and colored output for usability. No detection or scanning functionality is present; this is a direct exploit. The only endpoints referenced are the Wazuh API endpoint, the attacker's IP/port for the reverse shell, and an optional local proxy for traffic interception.
This repository provides a working proof-of-concept (PoC) exploit for CVE-2025-24016, a critical remote code execution (RCE) vulnerability in the Wazuh server (wazuh-manager) versions 4.4.0 through 4.9.0. The exploit leverages unsafe deserialization in the Wazuh API's /security/user/authenticate/run_as endpoint, allowing an authenticated attacker to execute arbitrary Python code on the server. The main exploit script (CVE-2025-24016-POC.py) constructs a malicious JSON payload using the __reduce__ method to trigger code execution via Python's os.system or subprocess modules. The script sends this payload to the vulnerable endpoint using HTTP POST, authenticating with a base64-encoded username and password. The README.md provides detailed vulnerability context, example payloads, and mitigation advice. The repository contains three files: the exploit script (Python), a README with technical and usage details, and a standard MIT license. The exploit is operational, requiring valid API credentials and network access to the Wazuh API endpoint.
This repository contains a Python exploit script (exploit_wazuh.py) and a requirements.txt file specifying dependencies. The exploit targets Wazuh worker servers accessible over HTTPS, defaulting to port 55000, and requires valid HTTP Basic Authentication credentials. The script sends a specially crafted JSON payload to the '/security/user/authenticate/run_as' endpoint, exploiting insecure deserialization or command injection to execute arbitrary system commands on the server. The output of the command is returned to the attacker. The repository is operational, providing a working exploit with customizable command execution, but does not include advanced payload management or integration with exploitation frameworks.
This repository contains a Python proof-of-concept exploit for CVE-2025-24016, a remote code execution (RCE) vulnerability in Wazuh servers. The exploit leverages unsafe deserialization in the Wazuh DistributedAPI (DAPI), specifically by injecting a crafted dictionary into a DAPI request to the '/security/user/authenticate/run_as' endpoint. The main script, 'CVE-2025-24016.py', is a command-line tool that requires the attacker to specify the target URL, their own IP address, and a port for the reverse shell. It authenticates to the Wazuh server (with default or user-supplied credentials), sends a malicious JSON payload that triggers the vulnerability, and attempts to establish a reverse shell back to the attacker's machine. The repository also includes a README with detailed usage instructions and a requirements.txt for dependencies. The exploit is operational, providing a working reverse shell if the target is vulnerable and accessible. No detection-only scripts are present; the code is a functional exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
44 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A specific vulnerability listed as suspected to be exploited by Iran-linked actors in real-world campaigns; no further technical detail is provided in the content.
A 2025 vulnerability tracked in the report as one of the CVEs adopted by RondoDox after disclosure.
A critical Wazuh Server unsafe deserialization vulnerability exploited to drop Mirai-based botnet variants for DDoS.
A vulnerability in Wazuh servers exploited by Mirai variants for botnet propagation and malware delivery.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.