# CVE-2025-24016: Wazuh Server Deserialization of Untrusted Data

> An unsafe deserialization flaw in Wazuh server allows attackers with API access to execute arbitrary Python code remotely.

- **Severity:** Critical 9.9 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H`)
- **Exploited in the wild:** Yes, since 10 Jun 2025 (CISA KEV)
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Feb 2025
- **Updated:** 26 Feb 2026
- **Also known as:** GHSA-hcrc-79hj-m3qh, GO-2025-3459

## What is CVE-2025-24016?

CVE-2025-24016 is a critical unsafe deserialization vulnerability in Wazuh Wazuh, published on 10 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2025-24016?

3 open source packages ship an affected version, including github.com/wazuh/wazuh. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/wazuh/wazuh` | Go | From 4.4.0 | 4.9.1 |
| `github.com/wazuh/wazuh` | Go | From 4.4.0 | 4.9.1 |
| `github.com/wazuh/wazuh` | Go | From 4.4.0+incompatible | 4.9.1+incompatible |

Products: Wazuh Wazuh.

## How do I fix CVE-2025-24016?

Upgrade github.com/wazuh/wazuh to a fixed version for your release line: 4.9.1 or 4.9.1+incompatible. US federal agencies must fix it by 1 Jul 2025.

## Is CVE-2025-24016 being exploited?

Yes. Attackers have exploited CVE-2025-24016 in the wild since at least 10 Jun 2025.

Public exploit code:

- CVE-2025-24016: Wazuh Unsafe Deserialization Remote Code Execution (RCE) (github_poc): https://github.com/0xjessie21/CVE-2025-24016
- Wazuh 8.4 CVE-2025-24016 (github_poc): https://github.com/guinea-offensive-security/Wazuh-RCE
- CVE-2025-24016: RCE in Wazuh server!  Remote Code Execution  (github_poc): https://github.com/MuhammadWaseem29/CVE-2025-24016
- https://github.com/huseyinstif/CVE-2025-24016-Nuclei-Template (github_poc): https://github.com/huseyinstif/CVE-2025-24016-Nuclei-Template
- A critical RCE vulnerability has been identified in the Wazuh server due to unsafe deserialization in the wazuh-manager package. This bug affects Wazuh versions ≥ 4.4.0 and has been patched in version 4.9.1. (github_poc): https://github.com/cybersecplayground/CVE-2025-24016-Wazuh-Remote-Code-Execution-RCE-PoC
- Detection for CVE-2025-24016 - Deserialization of Untrusted Data Vulnerability in the Wazuh software (github_poc): https://github.com/rxerium/CVE-2025-24016

## Other vulnerabilities in Wazuh Wazuh

- [CVE-2024-32038](https://insights.sbomify.com/CVE-2024-32038/): Wazuh Analysis Engine Event Decoder Heap-based Buffer Overflow Remote Code Execution Vulnerability (critical 9.8)
- [CVE-2021-44079](https://insights.sbomify.com/CVE-2021-44079/): Command injection in n/a (critical 9.8)
- [CVE-2024-1243](https://insights.sbomify.com/CVE-2024-1243/): Remote code execution and local privilege escalation in Wazuh Windows agent via NetNTLMv2 hash theft (critical 9.5)
- [CVE-2026-61800](https://insights.sbomify.com/CVE-2026-61800/): Wazuh cluster worker file sync allows arbitrary file write under /var/ossec (incomplete fix for CVE-2026-30893) (critical 9.1)
- [CVE-2026-48024](https://insights.sbomify.com/CVE-2026-48024/): Wazuh: merged-file header path traversal in cluster sync allows arbitrary file write under WAZUH_PATH in Wazuh manager (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24016 and fix it if it is affected.

What it is: CVE-2025-24016 is a critical unsafe deserialization vulnerability in Wazuh Wazuh, published on 10 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2025-24016 in the wild since at least 10 Jun 2025.

Affected packages and fixed versions:
- github.com/wazuh/wazuh (Go): affected from 4.4.0; fixed in 4.9.1
- github.com/wazuh/wazuh (Go): affected from 4.4.0; fixed in 4.9.1
- github.com/wazuh/wazuh (Go): affected from 4.4.0+incompatible; fixed in 4.9.1+incompatible

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-24016/ (Markdown: https://insights.sbomify.com/CVE-2025-24016/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-24016
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-24016
- OSV: https://osv.dev/vulnerability/CVE-2025-24016

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-24016/
Summaries are generated and may contain mistakes; the official description above is the record.
