/

CVE-2026-56699

Severity:

CRITICAL RISK

(10.0)

Injection in OpenSearch Bulk NDJSON (CWE-74) Wazuh

CVE-2026-56699

Awaiting Analysis

Vulnerability type

Category:

Injection Vulnerability

CWE:

CWE-74

Impact:

Data Integrity Compromise and SIEM State Manipulation

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Wazuh Manager before 5.0.0-beta3 fails to correctly escape the DataValue.index field when building OpenSearch bulk NDJSON requests, allowing agents to inject arbitrary operations.

When a malicious or compromised agent can control this field, it can smuggle delete, index, or update actions executed with the manager's admin privileges, leading to SIEM data tampering and cross-agent state manipulation.

Affected context

This vulnerability arises in Wazuh deployments where the manager constructs OpenSearch bulk requests based on agent-supplied data.

It is most relevant in environments where agents are enrolled but not fully trusted, or where an attacker can compromise an agent or intercept and modify its outbound traffic.

The issue appears when the DataValue.index field is inserted into NDJSON request bodies without proper escaping or structure validation, allowing injected OpenSearch operations to be processed as if they were legitimate bulk actions.

Exploit preconditions

  • Attack surface: Wazuh Manager's OpenSearch integration endpoint that processes bulk NDJSON requests.
  • Required access: Ability to enroll a malicious agent, compromise an existing agent, or manipulate traffic between an agent and the manager.
  • Trigger point: Submission of crafted data in the DataValue.index field such that, when concatenated into an NDJSON bulk body, it introduces additional OpenSearch operations.
  • Why exploitation is possible: The manager embeds the field directly into NDJSON without escaping special characters or enforcing strict schema boundaries, allowing attacker-controlled text to break out of its intended context and be interpreted as standalone bulk operations under administrative credentials.

Why this happens

The underlying bug aligns with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

Wazuh Manager takes input from agents (the DataValue.index field) and uses it to construct NDJSON payloads for OpenSearch bulk APIs without neutralizing control characters or enforcing structure.

This insecure pattern of directly concatenating untrusted data into a protocol-specific payload allows the input to alter the meaning of the output, enabling the injection of unintended delete, index, or update operations processed by the downstream OpenSearch cluster.

Potential impact

  • An attacker may delete existing SIEM documents, including logs or alerts, to hide malicious activity.
  • A compromised agent could tamper with alert data, injecting false positives or false negatives into the index.
  • Cross-agent manipulation of SIEM state could occur, where one agent's data corrupts or overrides records attributed to other agents.
  • An attacker can potentially disrupt detection, incident response, and compliance reporting by corrupting the underlying OpenSearch data.
  • The integrity and reliability of security monitoring dashboards and reports may be significantly degraded.

General mitigation guidance

Mitigation should focus on enforcing strict separation between agent-supplied data and protocol-level control structures in bulk NDJSON payloads.

Recommended defensive patterns include:

  • Treating all agent-provided fields as data only and ensuring they are properly escaped or encoded so they cannot alter NDJSON structure.
  • Implementing server-side schema validation that restricts allowed characters and formats for index-related fields before constructing bulk requests.
  • Using structured composition APIs or libraries for OpenSearch requests rather than manual string concatenation, so control and data are cleanly delineated.
  • Applying least-privilege principles to search and indexing credentials, limiting what bulk operations the manager can perform where feasible.
  • Introducing additional authorization checks so that agents cannot indirectly request destructive operations (such as deletes) beyond their intended scope.

How teams detect issues like this

Detection efforts can center on both code-level patterns and runtime behavior:

  • Static analysis rules to flag direct concatenation of untrusted fields into protocol-specific payloads (e.g., NDJSON, SQL, XML) without escaping.
  • Code reviews focusing on output construction routines for OpenSearch or other backend integrations, checking for missing sanitization, schema enforcement, or use of safe builders.
  • Logging and monitoring of OpenSearch bulk operations for anomalous delete or update patterns originating from Wazuh Manager, especially operations targeting unexpected indices or documents.
  • Security policies in CI/CD that require use of structured client libraries and prohibit manual assembly of NDJSON or query payloads from raw user or agent input.
  • Automated application security testing tools configured to search for injection vectors in data pipelines between agents and backend stores.

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-ff9g-85jq-r3g3
vulncheck.comvulncheck.com/advisories/wazuh-manager-ndjson-injection-in-inventory-sync-via-agent-controlled-datavalue-index

Frequently asked

questions

Exploitability is tied to agent control: any environment where an attacker can enroll a rogue agent or compromise an existing one can be affected. The injection is processed by the manager and then forwarded to OpenSearch, so it can impact the entire SIEM dataset, not just data from the attacking agent.

An attacker must be able to influence the DataValue.index field supplied to the Wazuh Manager, typically by controlling an agent or intercepting traffic sent by an agent. Direct administrative access to the manager is not required because the exploit abuses the manager's own privileged OpenSearch credentials.

The safest approach is to construct OpenSearch bulk requests using structured builders that keep control fields and data separate, while strictly validating and escaping any agent-supplied values. Enforcing tight schemas and disallowing special characters that can break NDJSON structure reduces the ability for injected operations to be interpreted as legitimate bulk actions.

Organizations should adopt a defensive development standard that treats all external input (including data from "trusted" agents) as untrusted, employs consistent escaping or encoding before output to downstream components, and mandates schema validation. Regular security code reviews, static analysis for injection patterns, and adherence to least-privilege design for backend integrations further lower the risk of similar bugs emerging in logging and SIEM pipelines.

Find out what's already
exploitable in your codebase.