/

CVE-2026-74034

Severity:

HIGH RISK

(7.5)

Missing Authorization (CWE-862) in Wazuh Agent Upgrade

CVE-2026-74034

Awaiting Analysis

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Arbitrary File Read and Sensitive Data Disclosure

Severity:

HIGH RISK

(7.5)

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 contains a missing authorization check in the agent upgrade handler, allowing an enrolled agent to submit an unauthorized custom-upgrade request with a controlled file path. Under deployments affected by this flaw, an attacker may read arbitrary files as root, including sensitive credentials such as /etc/shadow and client.keys.

Wazuh contains a missing authorization check in the agent upgrade handler, allowing an enrolled agent to submit an unauthorized custom-upgrade request with a controlled file path. Under deployments affected by this flaw, an attacker may read arbitrary files as root, including sensitive credentials such as /etc/shadow and client.keys.

Affected context

The vulnerability occurs in Wazuh deployments using the agent upgrade functionality and agent communication channel. It becomes risky when an attacker controls or compromises an enrolled agent and the upgrade handler processes custom upgrade requests without verifying whether the requested operation is authorized.

The vulnerability occurs in Wazuh deployments using the agent upgrade functionality and agent communication channel. It becomes risky when an attacker controls or compromises an enrolled agent and the upgrade handler processes custom upgrade requests without verifying whether the requested operation is authorized.

Exploit preconditions

  • Attack surface: Wazuh agent communication channel and upgrade handler
  • Required access: Control of, or code execution within, an enrolled agent
  • Trigger point: Processing of a custom upgrade request containing an attacker-controlled file path
  • Why exploitation is possible: The handler does not adequately verify authorization or request origin before accessing the specified path
  • Attack surface: Wazuh agent communication channel and upgrade handler
  • Required access: Control of, or code execution within, an enrolled agent
  • Trigger point: Processing of a custom upgrade request containing an attacker-controlled file path
  • Why exploitation is possible: The handler does not adequately verify authorization or request origin before accessing the specified path

Why this happens

The underlying issue is a missing authorization decision in the wm_agent_upgrade processing path. A request from an enrolled agent is accepted as sufficient authority to perform a privileged file operation, without validating whether the requested custom upgrade action and target path are permitted. This maps to CWE-862: Missing Authorization, where an application fails to enforce an access-control check before allowing a protected operation.

The underlying issue is a missing authorization decision in the wm_agent_upgrade processing path. A request from an enrolled agent is accepted as sufficient authority to perform a privileged file operation, without validating whether the requested custom upgrade action and target path are permitted. This maps to CWE-862: Missing Authorization, where an application fails to enforce an access-control check before allowing a protected operation.

Potential impact

  • Attackers may read arbitrary files accessible to the Wazuh process
  • Sensitive credentials, hashes, keys, or configuration data could be disclosed
  • The confidentiality of managed hosts may be reduced
  • Exposed agent keys could support further unauthorized interaction
  • Attackers could use recovered information for lateral movement or follow-on attacks
  • Attackers may read arbitrary files accessible to the Wazuh process
  • Sensitive credentials, hashes, keys, or configuration data could be disclosed
  • The confidentiality of managed hosts may be reduced
  • Exposed agent keys could support further unauthorized interaction
  • Attackers could use recovered information for lateral movement or follow-on attacks

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the point where agent-originated upgrade requests are interpreted.

Defensive patterns include:

  • Require explicit authorization for custom upgrade operations rather than trusting enrollment alone
  • Validate request origin, agent identity, operation type, and permitted file locations
  • Restrict file access to an allowlisted, dedicated upgrade directory
  • Avoid running upgrade handlers with unnecessary root privileges
  • Apply least-privilege service accounts and filesystem permissions
  • Protect agent credentials and rotate them when compromise is suspected
  • Use secure-by-default policies that disable custom file-based upgrade behavior unless required

Mitigation generally focuses on enforcing authorization at the point where agent-originated upgrade requests are interpreted.

Defensive patterns include:

  • Require explicit authorization for custom upgrade operations rather than trusting enrollment alone
  • Validate request origin, agent identity, operation type, and permitted file locations
  • Restrict file access to an allowlisted, dedicated upgrade directory
  • Avoid running upgrade handlers with unnecessary root privileges
  • Apply least-privilege service accounts and filesystem permissions
  • Protect agent credentials and rotate them when compromise is suspected
  • Use secure-by-default policies that disable custom file-based upgrade behavior unless required

How teams detect issues like this

Detection approaches can include:

  • Static analysis and code review for file operations performed before authorization checks
  • Searching for upgrade handlers that accept client-controlled paths or filenames
  • Monitoring agent-channel traffic for unusual custom upgrade requests
  • Alerting on Wazuh processes reading sensitive system files
  • Enforcing policies that require allowlisted paths and explicit authorization for privileged agent actions
  • Reviewing audit logs for unexpected access to credential stores, shadow files, or agent key material

Detection approaches can include:

  • Static analysis and code review for file operations performed before authorization checks
  • Searching for upgrade handlers that accept client-controlled paths or filenames
  • Monitoring agent-channel traffic for unusual custom upgrade requests
  • Alerting on Wazuh processes reading sensitive system files
  • Enforcing policies that require allowlisted paths and explicit authorization for privileged agent actions
  • Reviewing audit logs for unexpected access to credential stores, shadow files, or agent key material

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.8
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-r7hm-43xr-477j
vulncheck.comvulncheck.com/advisories/wazuh-4.1.0-before-4.14.8-arbitrary-file-read-via-upgrade-custom-command

Frequently asked

questions

It can be exploitable through the Wazuh agent communication channel when an attacker controls or compromises an enrolled agent. It is not necessarily unauthenticated because enrollment and agent-channel access are relevant prerequisites.

The attacker generally needs control of an enrolled agent or the ability to send messages accepted as coming from one. The issue does not require administrative access to the Wazuh manager if the agent-channel trust relationship is abused.

Enforce authorization before processing custom upgrade requests, restrict file access to approved locations, and run the handler with the minimum privileges required.

Treat enrolled clients as untrusted input sources, apply explicit authorization checks to every privileged operation, use path allowlists, and monitor for unexpected privileged file access.

It can be exploitable through the Wazuh agent communication channel when an attacker controls or compromises an enrolled agent. It is not necessarily unauthenticated because enrollment and agent-channel access are relevant prerequisites.

The attacker generally needs control of an enrolled agent or the ability to send messages accepted as coming from one. The issue does not require administrative access to the Wazuh manager if the agent-channel trust relationship is abused.

Enforce authorization before processing custom upgrade requests, restrict file access to approved locations, and run the handler with the minimum privileges required.

Treat enrolled clients as untrusted input sources, apply explicit authorization checks to every privileged operation, use path allowlists, and monitor for unexpected privileged file access.

Find out what's already
exploitable in your codebase.