June 12 Advisory: Wazuh RCE Vulnerability Exploited to Deploy Mirai Botnets [CVE-2025-24016]

Rapid Response

Vulnerability Description

CVE-2025-42016 is a critical (CVSS 9.9) remote code execution (RCE) vulnerability affecting Wazuh versions 4.4.0 through 4.9.0. The flaw stems from unsafe deserialization of JSON objects within the DistributedAPI (DAPI), specifically in the az_wazuh_object function. 

wazuh_server.png
Example Exposed Wazuh Server

Any threat actor with API access (including a compromised dashboard, internal server, or a compromised agent) can exploit this vulnerability to execute arbitrary Python code on Wazuh servers by injecting an unsanitized dictionary into DAPI requests. A publicly available proof of concept (PoC) exploit published on GitHub demonstrates RCE through a crafted request to the /security/user/authenticate/run_as URI.

Threat Activity

Akamai’s Security Intelligence Response Team (SIRT) was the first to observe exploitation activity in early March 2025. The initial wave involved a Mirai variant known as “morte”, which deploys a malicious shell script to download the main payload. Akamai suggested these samples appear to be LZRD Mirai variants. 

In early May 2025, Akamai observed a second campaign leveraging the Resbot (aka Resentual) botnet, delivering a payload named “resgod”, identified by its hard-coded console string: “Resentual got you!” Both botnets used similar delivery methods, and Akamai’s report includes IOCs, malware samples, and Snort/Yara rules to support detection efforts.

Additionally at the time of writing, 12 malicious IPs were observed attempting to exploit this vulnerability in GreyNoise Visualizer.

Despite early signs of exploitation activity, this vulnerability was just recently added to CISA’s Known Exploited Vulnerabilities (KEV) Catalog on June 10, 2025. 

FieldDetails
CVE-IDCVE-2025-24016 – CVSS 9.9 (Critical) – assigned by GitHub Inc.
Vulnerability DescriptionAuthenticated RCE due to improper input validation of the _from parameter in program/actions/settings/upload.php
Date of DisclosureFebruary 10, 2025
Date Reported as Actively ExploitedEvidence of active exploitation first observed in Early March 2025 by Akamai SIRT
Affected AssetsUnsafe deserialization of JSON objects within the DistributedAPI, specifically in the az_wazuh_object function of Wazuh 4.4.0 – 4.9.0
Vulnerable Software Versions Wazuh 4.4.0 – 4.9.0
PoC Available?Public exploit code has been published on GitHub. 
Exploitation StatusThis vulnerability is known to be actively exploited and was added to CISA KEV on June 10, 2025. Akamai SIRT attributed activity to deploying the Mirai botnet in early March 2025 and early May 2025. 
Patch StatusWazuh version 4.9.1 contains a fix for this vulnerability. 

Censys Perspective

At the time of writing, Censys observed 17,329 exposed Wazuh servers instances online, many of which are exposing version information. The versions in the table below were observed most frequently: 

VersionVulnerability StatusHost Count
4.12.0Not Vulnerable1,350
4.11.2Not Vulnerable1,185
4.10.1Not Vulnerable340
4.9.2Not Vulnerable338
4.11.1Not Vulnerable283
4.11.0Not Vulnerable251
4.9.0Vulnerable116
4.9.1Not Vulnerable77
4.10.0Not Vulnerable54
4.10.2Not Vulnerable 7

The majority of Wazuh servers exposing versions appear to be patched. However, a significant number of hosts did not reliably expose version information and should therefore be considered potentially vulnerable. 

The queries below can be used to identify exposed instances of Wazuh servers, but they are not necessarily vulnerable to the exploit. Please note that these fingerprints were recently modified as results may take up to 24 hours to fully propagate. 

Censys Platform Query:

web.software: (vendor: "Wazuh" and product: "Wazuh")

Censys Legacy Search Query:

services.software: (vendor="Wazuh" and product="Wazuh")

Censys ASM Query:

host.services.software: (vendor="Wazuh" and product="Wazuh") or web_entity.instances.software: (vendor="Wazuh" and product="Wazuh")

The query below can be used to find instances of Wazuh server that are vulnerable to the exploit. Please note that this risk was recently deployed and results may take up to 24 hours to fully propagate. 

Censys ASM Risk Query:

risks.name = "Vulnerable Wazuh [CVE-2025-24016]"
wazuh.png
Map of Exposed Wazuh Servers

References

Subscribe to our blog