CVE-2025-24016
Remote code execution in Wazuh server
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.9
Remote code execution in Wazuh server
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.
- Record
CVE-2025-24016- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2025-3595
9.9
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.
- Record
EUVD-2025-3595- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-hcrc-79hj-m3qh
9.9
Wazuh server vulnerable to remote code execution
Summary
An unsafe deserialization vulnerability allows for remote code execution on Wazuh servers.
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.
Details
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.
Using the server API, it quite easy to trigger. For example, using the run_as endpoint (implemented by run_as_login in api/api/controllers/security_controller.py): the auth_context argument is completely controlled by the attacker, and is forwarded to the master server to handle. By sending a malicious run_as request to a worker server, it is possible to execute code on the master server.
It is also possible to exploit the bug as a compromised agent, in certain configurations.
A compromised agent can respond to a getconfig request with a malicious JSON object (containing a serialized unhandled exception). If the getconfig request was caused because of a server API request to /agents/{agent_id}/config/{component}/{configuration} (api.controllers.agent_controller.get_agent_config), and the agent is managed by a server other than the one that received the server API request, the unsafe deserialization will occur on the server that received the original server API request.
user server A server B agent
| | | |
| -get-config-> | | |
| | --get-config-dapi-> | |
| | | --getconf-> |
| | | <-payload-- |
| X <-----payload------ | |
| | | |
It is likely that there are more ways to reach the unsafe deserialization function (as_wazuh_object), some of them might even be accessible from different contexts (without credentials, or initiated by a compromised agent). I suggest fixing the root cause instead of attempting to sanitize inputs that reach it. Note that there are multiple other ways to execute arbitrary code in as_wazuh_object, easier by using a __callable__, or potentially abusing callable gadgets in exception, wresults or Wazuh.
PoC
To trigger using the server API (assuming default credentials):
curl -X POST -k -u "wazuh-wui:MyS3cr37P450r.*-" -H "Content-Type: application/json" --data '{"__unhandled_exc__":{"__class__": "exit", "__args__": []}}' https://<worker-server>:55000/security/user/authenticate/run_as
this will shut down the master server.
Impact
This is a remote code execution on Wazuh server, affecting the latest version (v4.9.0 at this time)
- Record
GHSA-hcrc-79hj-m3qh- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H/E:H - Weakness
- CWE-502
- Updated
- 2026-11-02
CISA KEV No score
Wazuh Server Deserialization of Untrusted Data Vulnerability
Wazuh contains a deserialization of untrusted data vulnerability that allows for remote code execution on Wazuh servers.
- Record
CVE-2025-24016- Weakness
- CWE-502
- Updated
- 2026-11-02
NVD
9.9
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.
- Record
CVE-2025-24016- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSV
9.9
Remote code execution in Wazuh server
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.
- Record
CVE-2025-24016- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVGHSA-hcrc-79hj-m3qh
9.9
Wazuh server vulnerable to remote code execution
Summary
An unsafe deserialization vulnerability allows for remote code execution on Wazuh servers.
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.
Details
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.
Using the server API, it quite easy to trigger. For example, using the run_as endpoint (implemented by run_as_login in api/api/controllers/security_controller.py): the auth_context argument is completely controlled by the attacker, and is forwarded to the master server to handle. By sending a malicious run_as request to a worker server, it is possible to execute code on the master server.
It is also possible to exploit the bug as a compromised agent, in certain configurations.
A compromised agent can respond to a getconfig request with a malicious JSON object (containing a serialized unhandled exception). If the getconfig request was caused because of a server API request to /agents/{agent_id}/config/{component}/{configuration} (api.controllers.agent_controller.get_agent_config), and the agent is managed by a server other than the one that received the server API request, the unsafe deserialization will occur on the server that received the original server API request.
user server A server B agent
| | | |
| -get-config-> | | |
| | --get-config-dapi-> | |
| | | --getconf-> |
| | | <-payload-- |
| X <-----payload------ | |
| | | |
It is likely that there are more ways to reach the unsafe deserialization function (as_wazuh_object), some of them might even be accessible from different contexts (without credentials, or initiated by a compromised agent). I suggest fixing the root cause instead of attempting to sanitize inputs that reach it. Note that there are multiple other ways to execute arbitrary code in as_wazuh_object, easier by using a __callable__, or potentially abusing callable gadgets in exception, wresults or Wazuh.
PoC
To trigger using the server API (assuming default credentials):
curl -X POST -k -u "wazuh-wui:MyS3cr37P450r.*-" -H "Content-Type: application/json" --data '{"__unhandled_exc__":{"__class__": "exit", "__args__": []}}' https://<worker-server>:55000/security/user/authenticate/run_as
this will shut down the master server.
Impact
This is a remote code execution on Wazuh server, affecting the latest version (v4.9.0 at this time)
- Record
GHSA-hcrc-79hj-m3qh- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H/E:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVGO-2025-3459 No score
Remote code execution in Wazuh server in github.com/wazuh/wazuh
Remote code execution in Wazuh server in github.com/wazuh/wazuh
- Record
GO-2025-3459- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:14889-1 No score
govulncheck-vulndb-0.0.20250312T181707-1.1 on GA media
These are all security issues fixed in the govulncheck-vulndb-0.0.20250312T181707-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:14889-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/wazuh/wazuhGo |
4.4.0 up to 4.9.1 | 4.9.1 |
github.com/wazuh/wazuhGo |
4.4.0+incompatible up to 4.9.1+incompatible | 4.9.1+incompatible |
govulncheck-vulndbopenSUSE:Tumbleweed From an advisory covering 31 CVEs |
before 0.0.20250312T181707-1.1 | 0.0.20250312T181707-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Metasploit | Wazuh server remote code execution caused by an unsafe deserialization vulnerability. | 2025-02-10 |
| PoC in GitHub | huseyinstif/CVE-2025-24016-Nuclei-Template | 2025-02-13 |
| PoC in GitHub | 0xjessie21/CVE-2025-24016 | 2025-02-16 |
| PoC in GitHub | MuhammadWaseem29/CVE-2025-24016 | 2025-02-20 |
| PoC in GitHub | GloStarRx1/CVE-2025-24016 | 2025-02-21 |
| PoC in GitHub | celsius026/poc_CVE-2025-24016 | 2025-04-15 |
| PoC in GitHub | cybersecplayground/CVE-2025-24016-Wazuh-Remote-Code-Execution-RCE-PoC | 2025-04-21 |
| PoC in GitHub | rxerium/CVE-2025-24016 | 2025-06-10 |
| PoC in GitHub | guinea-offensive-security/Wazuh-RCE | 2025-07-13 |
| Nuclei | Wazuh - Unsafe Deserialization Remote Code Execution |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| exploitation, exploits | ||
| first indexed | CVE List, EUVD, GitHub Advisories, CISA KEV, Metasploit, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-24016 is a critical vulnerability (CVSS 9.9) in Wazuh, published February 10, 2025. CISA lists it as known to be exploited, since June 10, 2025. EUVD reports exploitation since June 10, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 93.8%, the 99th percentile. Fixed in github.com/wazuh/wazuh 4.9.1.
References
github.com/wazuh/wazuh/security/advisories/GHSA-hcrc-79hj-m3qh
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-24016
nvd.nist.gov/vuln/detail/CVE-2025-24016
github.com/advisories/GHSA-hcrc-79hj-m3qh
github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24016.json
github.com/wazuh/wazuh
Show 31 moreShow less
suse.com/security/cve/CVE-2024-57603
suse.com/security/cve/CVE-2024-57604
suse.com/security/cve/CVE-2025-0426
suse.com/security/cve/CVE-2025-1243
suse.com/security/cve/CVE-2025-1293
suse.com/security/cve/CVE-2025-1412
suse.com/security/cve/CVE-2025-20051
suse.com/security/cve/CVE-2025-22870
suse.com/security/cve/CVE-2025-22952
suse.com/security/cve/CVE-2025-23387
suse.com/security/cve/CVE-2025-23388
suse.com/security/cve/CVE-2025-23389
suse.com/security/cve/CVE-2025-24016
suse.com/security/cve/CVE-2025-24526
suse.com/security/cve/CVE-2025-24806
suse.com/security/cve/CVE-2025-24976
suse.com/security/cve/CVE-2025-25196
suse.com/security/cve/CVE-2025-25199
suse.com/security/cve/CVE-2025-25204
suse.com/security/cve/CVE-2025-25279
suse.com/security/cve/CVE-2025-25294
suse.com/security/cve/CVE-2025-27088
suse.com/security/cve/CVE-2025-27090
suse.com/security/cve/CVE-2025-27100
suse.com/security/cve/CVE-2025-27112
suse.com/security/cve/CVE-2025-27144
suse.com/security/cve/CVE-2025-27155
suse.com/security/cve/CVE-2025-27414
suse.com/security/cve/CVE-2025-27421
suse.com/security/cve/CVE-2025-27507
suse.com/security/cve/CVE-2025-27509