Wazuh Manager Trusts Agent-Supplied Cluster Attribution in Inventory Sync
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-jv5p-fhwh-9w55. Fix status from GitHub. Impact type from CWE-345.
Summary
An enrolled Wazuh agent can persist arbitrary cluster_name and cluster_node values through the inventory synchronization path. The manager checks the agentid in the Start FlatBuffer against the authenticated agent but does not validate or override the two cluster fields, and those values are written into indexed inventory and vulnerability documents. An attacker with only a valid enrolled agent credential can forge wazuh.cluster.name, influence the inventory document _id prefix, and possibly hide records from cluster-scoped queries. In shared-indexer multi-cluster deployments where agent IDs collide, the attacker may overwrite another cluster's inventory records.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
## Summary An enrolled Wazuh agent can persist arbitrary `cluster_name` and `cluster_node` values through the inventory synchronization path. The manager validates the `agentid` in the inventory-sync `Start` FlatBuffer against the authenticated agent identity, but it does not validate or override the `cluster_name` and `cluster_node` fields from the same message. These agent-supplied values are later used when generating indexed inventory and vulnerability documents. This allows a low-privileged enrolled agent to spoof cluster attribution in indexed state documents. In shared-indexer multi-cluster deployments, this may enable persistent cross-cluster inventory tampering if agent IDs collide across clusters. ## Affected Version Wazuh `main` / `5.0.0-beta3` at: ```text b3dae02ec9ddcfd449cb61b4c76d180e3e43f79a ``` ## Impact A malicious enrolled agent can: * Forge `wazuh.cluster.name` in inventory documents * Influence the inventory document `_id` prefix * Forge cluster attribution in vulnerability documents * Potentially orphan or hide inventory records from cluster-scoped dashboards or queries * In shared-indexer multi-cluster deployments, potentially overwrite or poison another cluster’s inventory records when numeric agent IDs collide This is a data integrity and attribution spoofing issue. The attacker does not need API administrator privileges, cluster keys, or local `wazuh` user access; only a valid enrolled agent credential is required. ## Root Cause The inventory-sync `Start` FlatBuffer contains both `agentid` and cluster attribution fields. The manager validates `agentid`, but trusts `cluster_name` and `cluster_node`. Relevant flow: ```text src/shared_modules/router/src/router.cpp ``` The router validates the authenticated agent ID against the `Start.agentid`, but does not validate `cluster_name` or `cluster_node`. ```text src/wazuh_modules/inventory_sync/src/agentSession.hpp ``` `cluster_name` and `cluster_node` from the agent-controlled `Start` message are copied into the session context. ```text src/wazuh_modules/inventory_sync/src/inventorySyncFacade.hpp ``` The trusted session context is later used to generate: ```text <clusterName>_<agentId>_<dataId> ``` as the inventory document `_id`, and to write: ```json { "wazuh": { "cluster": { "name": "<agent-controlled value>" } } } ``` The manager’s authoritative cluster name is used only as a fallback when the agent-supplied field is empty. ## Source-to-Sink Trace ### Source An enrolled agent sends an inventory-sync `Start` FlatBuffer containing: ```text agentid = authenticated agent ID cluster_name = attacker-controlled value cluster_node = attacker-controlled value ``` ### Authentication / Partial Validation The manager validates only the agent ID. ```text src/shared_modules/router/src/router.cpp ``` The `agentid` check prevents spoofing another agent ID, but no equivalent check is applied to cluster attribution. ### Session Construction ```text src/wazuh_modules/inventory_sync/src/agentSession.hpp ``` The agent-supplied `cluster_name` and `cluster_node` are stored in the inventory-sync session context. ### Inventory Document Indexing ```text src/wazuh_modules/inventory_sync/src/inventorySyncFacade.hpp ``` The session context value is used in the document `_id` prefix: ```text context.clusterName.empty() ? m_clusterName : context.clusterName ``` and in the indexed field: ```text document["wazuh"]["cluster"]["name"] ``` Because the agent can provide a non-empty value, the agent-controlled value wins over the manager-derived value. ### Vulnerability Document Attribution The same trusted context is also copied into vulnerability scanner context and later used for vulnerability document cluster fields. ## Security Boundary This crosses a real boundary because the attacker is only an enrolled endpoint agent, not a Wazuh administrator or cluster peer. The manager already has authoritative cluster identity from its own configuration, but the inventory-sync path accepts and persists the agent-provided cluster identity instead. ## Safe Validation Approach A safe lab-only validation can be performed as follows: 1. Deploy a disposable Wazuh test environment. 2. Enroll a test agent. 3. Send a benign inventory-sync `Start` message from that agent with its real `agentid` but a clearly fake `cluster_name`, such as: ```text AUDIT-PROBE-CLUSTER ``` 4. Submit a harmless synthetic inventory item. 5. Query the test indexer and verify whether the resulting inventory document contains: ```text wazuh.cluster.name = AUDIT-PROBE-CLUSTER ``` or whether the `_id` begins with: ```text AUDIT-PROBE-CLUSTER_<agentId>_ ``` No destructive payload or real production data is required. ## Suggested Fix The manager should not trust cluster attribution supplied by agents. Recommended changes: * Ignore `cluster_name` and `cluster_node` from inventory-sync agent messages. * Always derive cluster name and node from manager-side authoritative configuration. * Use the same manager-derived values for document `_id` generation and indexed `wazuh.cluster.*` fields. * Add regression tests proving that agent-supplied cluster attribution is overwritten. * Consider rejecting non-empty agent-supplied `cluster_name` / `cluster_node` if these fields are no longer needed in the protocol.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | wazuh-manager | 5.0.0-beta1 | 5.0.0-beta3 | Patch available | GHSA-jv5p-fhwh-9w55 |
- wazuh-manager Vendor— Affected 5.0.0-beta1 Fixed in 5.0.0-beta3 Patch available GHSA-jv5p-fhwh-9w55
Remediation
Upgrade wazuh-manager to 5.0.0-beta3, the fixed version. The last known affected version is 5.0.0-beta1.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-jv5p-fhwh-9w55 wazuh-manager Fixed in 5.0.0-beta3 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-jv5p-fhwh-9w55
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences