Uncontrolled SCA YAML alias expansion causes memory exhaustion in Wazuh

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-74030?

CVE-2026-74030 is a vulnerability classified as Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), affecting wazuh-agent (affected versions: 3.9.0 – < 4.14.8) and wazuh-manager (affected versions: 3.9.0 – < 4.14.8). This vulnerability is rated Medium, with a CVSS score of 6.9. Current sources do not report this vulnerability as exploited.

Overview

Original source data

Wazuh from 3.9.0 before 4.14.8 contains an uncontrolled YAML alias expansion vulnerability in yaml2json_node that allows a manager-controlled policy to exhaust agent memory. Attackers controlling the manager can push a small SCA policy with nested aliases via merged.mg to OOM-kill wazuh-modulesd on every agent in a group.

Affected products and scope

  • wazuh-agent: affected from 3.9.0 through versions less than 4.14.8; 4.14.8 is listed as unaffected.
  • wazuh-manager: affected from 3.9.0 through versions less than 4.14.8; 4.14.8 is listed as unaffected.

These boundaries are the ranges directly supported by the record and advisory. The status of other release branches outside these boundaries should not be inferred merely from the existence of a fix for 4.14.8.

Technical details

The flaw is in Wazuh's SCA policy parsing pipeline. wm_sca_yaml_to_cjson uses libyaml to create a YAML document, then yaml2json_node recursively descends into aliased nodes and allocates a fresh cJSON subtree for each alias visit. The cJSON tree is then serialized to text and parsed again by nlohmann::json, increasing peak memory use; the pipeline applies no limit to alias expansion, recursion depth, input size, or post-expansion node count. SCA policies delivered by the manager through merged.mg are written under etc/shared/<group>/*.yml and loaded by wazuh-modulesd when enabled policies are processed. YAML parsing occurs before c: or f: rule evaluation and before the isRemote heuristic, so sca.remote_commands does not prevent this denial of service. The evidence confirms uncontrolled alias expansion and memory exhaustion, but does not establish a code-execution or data-disclosure path; the exact guard implementation in the patched code is not fully established by the reviewed sources.

Exploitability

Exploitation requires a path from the manager to the agent through policy distribution, plus control of or high privileges on the Wazuh manager to push an attacker-controlled SCA policy. No end-user interaction is required after the policy is delivered; the described attack has low complexity and primarily affects agent availability. The maintainer advisory includes a standalone reproducer and proof-of-concept details, but the supplied record marks public_exploit as false; reproducibility should not be confused with evidence of exploitation in the wild. The record does not identify a specific campaign, victim, or breach.

Technical impact

The flaw expands YAML aliases recursively into a large cJSON structure, which is then copied again during conversion to nlohmann::json. On agents with smaller memory footprints or cgroup limits, wazuh-modulesd may be OOM-killed; when a targeted group receives the same policy, many agents may be affected simultaneously. The primary technical outcome is denial of service for SCA processing and agent telemetry, not confirmed data disclosure or modification. The flaw does not itself provide an authentication bypass, but it can be used after a manager has been compromised or accessed by an account with the required privileges. Recovery requires removing the bad policy and restarting the module, so the monitoring outage depends on deployment scope and operational response time.

Business impact

The flaw can turn a small SCA policy into extreme memory consumption on an agent and stop wazuh-modulesd. If the same policy is distributed to a group, many agents can lose telemetry at the same time, creating a monitoring and response gap across that group. Recovery may require replacing the policy, removing the bad policy file from the shared directory, and restarting the module on affected agents. The flaw does not itself break authentication or enable confirmed data access or modification; the main access condition is control of or high privilege on the manager.

Remediation

  1. Upgrade both wazuh-agent and wazuh-manager to 4.14.8, which the record and advisory list as fixed or unaffected.
  2. Until upgrading, restrict who can distribute SCA policies from the manager and allow only reviewed policies through merged.mg. This reduces exposure based on the attack precondition but does not replace the fix.
  3. Do not rely on sca.remote_commands or another agent-side flag to block the issue, because YAML parsing occurs before those rule and heuristic checks.
  4. If an incident has occurred, distribute a known-good policy, remove the bad policy file from etc/shared/ on affected agents, and restart wazuh-modulesd according to the organization's operating procedure. These recovery steps do not replace upgrading.
  5. Recheck both manager and agent deployments after upgrading, because updating only one side does not demonstrate that the full policy-delivery path is protected.

Detection

  1. Inventory versions of both wazuh-agent and wazuh-manager, then compare them with the affected branches in affected_summary; checking only one side of the deployment is insufficient.
  2. Review enabled SCA policies delivered through merged.mg, especially files under etc/shared/<group>/*.yml, for deeply nested YAML aliases or unexpected anchor and alias structures.
  3. Review host and service telemetry around SCA policy loading for sharp memory growth, OOM kills, or wazuh-modulesd restarts.
  4. Audit Wazuh manager access to identify accounts or administrative sessions able to distribute policies to the affected group.
  5. The memory and restart checks are precautionary monitoring, not unique IOCs; absence of those symptoms does not prove that a system 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.