Wazuh Manager SQL injection bypasses agent RBAC and exposes agent secrets

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-112341?

CVE-2026-112341 is a vulnerability classified as Improper Neutralization of Special Elements used in an SQL Command, affecting wazuh (affected versions: 4.0.0 – < 4.14.9). This vulnerability is rated High, with a CVSS score of 7.1. There is not enough data to determine whether this vulnerability has been exploited.

Overview

Original source data

Wazuh versions from 4.0.0 before 4.14.9 contain a sql injection vulnerability in WazuhDBBackend._substitute_params due to sequential regex placeholder cross-contamination. Authenticated users with agent:read on one agent can inject UNION SELECT via the q and search parameters to extract every agent's internal_key through a blind boolean oracle on total_affected_items.

Affected products and scope

  • The normalized record identifies Wazuh as affected from 4.0.0 through versions less than 4.14.9; the recorded default status is unaffected outside that range.
  • The vendor advisory identifies the wazuh-manager package, lists affected versions from 4.0.0, and identifies 4.14.9 as patched.
  • The same advisory states that the vulnerable code remains unchanged on the main branch, identified there as 5.1.0-alpha0. That branch is outside the normalized affected range and should not be assumed safe; its specific release status remains unresolved by the available evidence.

Technical details

The vulnerable component is WazuhDBBackend._substitute_params in Wazuh Manager's query-construction path. It performs sequential regex replacements across the entire SQL string, so a later replacement can rescan text inserted by an earlier replacement. When a q filter value contains the name of a placeholder processed later, such as :search, the search value can be inserted into an already quoted string; the manual quoting logic does not prevent the remaining text from being interpreted as SQL. The API forwards q and search into the WazuhDBQuery path, after which the query is sent to the manager's global database. The advisory confirms exposure on GET /agents, GET /groups, GET /agents/no_group, GET /agents/outdated, and GET /groups/{group_id}/agents. The described input-validation layers still permit the form needed for UNION SELECT, while the injected query branch is not constrained by the requesting account's agent-scoped RBAC predicate. Implementation details for other endpoints outside the confirmed list are not established by the available evidence.

Exploitability

The vulnerability is reachable over the network through the Wazuh API. An attacker must be authenticated and have agent:read on at least one agent, but does not need administrator privileges, additional user interaction, or a complex execution condition according to the supplied record. The vendor advisory publishes a proof of concept and documents validation against a live Wazuh Manager, including extraction of other agents' internal_key values through a blind boolean oracle. Public proof-of-concept exploitability is therefore established. The evidence reviewed does not establish exploitation in the wild.

Technical impact

The flaw allows an API account restricted to one agent to issue read queries outside its RBAC scope rather than limiting results to the authorized agent. The advisory confirms arbitrary read access to global.db and demonstrates extraction of every enrolled agent's internal_key through an oracle based on total_affected_items. Exposure of keys used to authenticate and protect agent traffic could enable agent impersonation, injection of fabricated monitoring events, receipt of shared configuration, or suppression of legitimate alerts; these are possible follow-on consequences of key theft. The flaw is not described as providing arbitrary SQL modification or direct availability loss, and the available evidence does not establish that every affected system has been exploited.

Business impact

The flaw breaks the agent isolation boundary that multi-tenant Wazuh deployments may rely on.

  • Manager database records and sensitive agent fields may be read outside the requesting account's authorized scope.
  • Disclosure of an agent's internal_key can increase the risk of agent impersonation and undermine trust in agent-to-manager communications.
  • If stolen keys are abused, monitoring data, alerts, and manager-provided configuration may be falsified or disrupted. These are possible consequences of key compromise, not evidence that every affected deployment has been compromised.
  • In a multi-tenant environment, allowing an account limited to one agent to access records for other agents creates material security and compliance risk.

Remediation

  1. Upgrade Wazuh Manager to exactly 4.14.9, which the vendor advisory identifies as patched. Do not turn that branch-specific fix into an open-ended claim about every later or parallel release.
  2. If running the main branch or 5.1.0-alpha0, do not assume that the 4.14.9 fix covers that branch. Confirm the corresponding vendor fix or move to a release whose remediation status is established.
  3. Until the upgrade is complete, reduce Wazuh API exposure and remove unnecessary agent:read permissions. This is containment, not a confirmed code fix.
  4. Review API use by accounts that can read agents. If unauthorized access is suspected or exposure of internal_key cannot be ruled out, follow the organization's process for rotating affected agent-manager secrets and investigate unexpected agent connections.

Detection

  • Inventory Wazuh Manager deployments and compare their releases with the affected branches listed in affected_summary.
  • Identify non-administrator accounts with agent:read, especially accounts scoped to only one agent.
  • Review API access logs for GET /agents, GET /groups, GET /agents/no_group, GET /agents/outdated, and GET /groups/{group_id}/agents, focusing on unusual requests that combine q and search or contain placeholder references such as :search.
  • If request and response telemetry is available, look for repeated queries that probe changes in total_affected_items. This is an investigative pattern, not a vendor-confirmed IOC.
  • Review agent-manager authentication and connection activity for unexpected agent identities, connections, or changes to monitored data, alerts, and configuration. The absence of these signs does not prove that a deployment is safe.
Sources (8)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.