Summary
A broken access control vulnerability in Wazuh Manager allows a low-privilege read-only API user to retrieve the cluster key and abuse trusted worker communications. With network access to the cluster communication port, an attacker may impersonate a worker, submit forged authorization data, and gain administrative control over users, credentials, configuration, and agent operations.
Affected context
The issue affects Wazuh Manager deployments where a read-only API account can access raw manager configuration containing the cluster key, and where the manager accepts worker-originated authorization context without independently validating its integrity. Exploitation also depends on network reachability to the cluster communication service on TCP port 1516.
Exploit preconditions
- Attack surface: Wazuh Manager API and cluster communication service
- Required access: A low-privilege API account with
manager:readpermission, plus network access to TCP port 1516 - Trigger point: Retrieval of raw manager configuration followed by a forged distributed API request
- Why exploitation is possible: The cluster key can be disclosed to an authorized but low-privilege user, while worker-supplied authorization context is trusted without sufficient integrity and privilege verification
Why this happens
The vulnerability results from exposing a sensitive cluster authentication key through an API response available to a low-privilege read-only user. The manager then relies on attacker-influenced worker authorization data, including RBAC permissions and mode, instead of independently establishing the caller's identity and effective privileges.
This maps to CWE-863: Incorrect Authorization, where access-control decisions fail to enforce the intended permissions for a protected operation. The underlying insecure pattern combines excessive disclosure of trust material with authorization decisions based on untrusted or insufficiently validated context.
Potential impact
- An attacker could impersonate a Wazuh cluster worker
- An attacker could create users or assign administrator privileges
- Credentials and API tokens could be exposed or misused
- Manager configuration could be modified without authorization
- Actions could be executed across monitored agents
- The Wazuh deployment could experience loss of administrative control
General mitigation guidance
Mitigation generally focuses on protecting cluster trust material and ensuring that every authorization decision is independently verified.
Common defensive patterns include:
- Preventing low-privilege API responses from exposing cluster keys or other authentication material
- Treating worker-supplied RBAC data as untrusted input
- Deriving effective permissions from server-side identity and policy rather than request-provided authorization fields
- Applying strict authentication and integrity checks to cluster communication
- Restricting TCP port 1516 to expected cluster peers through network policy or equivalent controls
- Using least-privilege service accounts and narrowly scoped administrator roles
- Rotating exposed cluster keys, credentials, and API tokens when disclosure is suspected
- Auditing and invalidating unexpected users, roles, tokens, and configuration changes
How teams detect issues like this
Organizations can detect related risks through:
- Static analysis and code review rules that flag authorization decisions based on client-controlled permission fields
- Tests verifying that low-privilege API users cannot retrieve secrets from raw configuration endpoints
- Integration tests that attempt to alter RBAC context in distributed requests
- Network monitoring for unexpected connections to TCP port 1516
- Audit-log reviews for newly created users, administrator role assignments, token issuance, configuration changes, and unusual agent actions
- Policy enforcement requiring server-side authorization checks for every privileged API operation
Automated security review tools may help identify exposed secrets and trust-boundary violations, but deployment-level testing remains important.

