Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

Unsafe Deserialization RCE in Wazuh DistributedAPI

IdentifiersCVE-2025-24016CWE-502· Deserialization of Untrusted Data

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.

Share:
For your environment

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.

ANALYST BRIEF

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.

Successful exploitation allows arbitrary Python code execution on the Wazuh server, giving an attacker the ability to fully compromise the affected server process and perform follow-on actions such as malware deployment, botnet installation, service disruption, and manipulation of security monitoring infrastructure. Available reporting states the vulnerability poses high risk to integrity and availability, and it has been observed in the wild being used to deploy Mirai variants for DDoS botnet activity. Because Wazuh commonly operates as a centralized XDR/SIEM component, compromise can have broader operational and defensive impact.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, restrict access to the Wazuh API and DAPI-related communication paths to only trusted administrative systems and cluster members, isolate or disable unnecessary exposure of management interfaces, and closely monitor for suspicious API activity, malformed DAPI request/response content, unexpected __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.

Upgrade Wazuh Server to version 4.9.1 or later, which contains the vendor fix. Prioritize patching all internet-exposed and clustered Wazuh deployments, especially systems with API exposure. After patching, investigate for signs of prior compromise because updating does not remediate historical exploitation or remove attacker persistence or payloads already deployed.
PUBLIC EXPLOITS

Exploits

5 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).

VALID 5 / 9 TOTALView more in app
Ashwesker-CVE-2025-24016MaturityPoCVerified exploit

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.

AshweskerDisclosed Jun 10, 2025pythonnetwork
Wazuh-RCEMaturityPoCVerified exploit

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.

guinea-offensive-securityDisclosed Jul 13, 2025pythonnetwork
CVE-2025-24016-Wazuh-Remote-Code-Execution-RCE-PoCMaturityPoCVerified exploit

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.

cybersecplaygroundDisclosed Apr 21, 2025pythonnetwork
poc_CVE-2025-24016MaturityPoCVerified exploit

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.

celsius026Disclosed Apr 15, 2025pythonnetwork
CVE-2025-24016MaturityPoCVerified exploit

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.

0xjessie21Disclosed Feb 16, 2025pythonnetwork
EXPOSURE SURFACE

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.

VendorProductType
WazuhWazuhapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware9

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity34

Community discussion across Reddit, Mastodon, and other social sources.