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.