/

CVE-2026-49441

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-73) in Wazuh Cluster File Sync

CVE-2026-49441

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-73

Impact:

Arbitrary File Overwrite and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

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

A path traversal vulnerability in Wazuh cluster file synchronization allows a trusted cluster peer to influence where an uploaded archive is extracted. If the peer possesses the shared authentication key and the service processes crafted metadata, security-sensitive files may be overwritten, potentially enabling code execution after a service reload.

Affected context

The issue occurs in Wazuh cluster deployments where the master processes peer-supplied file metadata during synchronization. Risk is present when a cluster peer can authenticate with the shared Fernet key and the file synchronization logic accepts a destination path without confirming that it remains within the intended cluster directory.

Exploit preconditions

  • Attack surface: Wazuh cluster file synchronization on the master
  • Required access: A cluster peer with the shared Fernet authentication key
  • Trigger point: Processing of peer-supplied file_path metadata from an uploaded archive
  • Why exploitation is possible: The destination is joined to the Wazuh installation path without a reliable containment check against the directory selected by the cluster item key

Why this happens

The underlying bug is an insufficiently constrained file path used during archive processing. A peer-controlled path is combined with a trusted base location, but the resulting destination is not rigorously verified to remain within the authorized synchronization directory. This behavior maps to CWE-73, External Control of File Name or Path, because untrusted metadata influences filesystem access and can redirect writes to sensitive locations.

Potential impact

  • Sensitive Wazuh configuration files may be overwritten
  • Security monitoring and response behavior could be altered
  • Root-executed commands may be configured through modified service settings
  • Code execution may occur after a privileged service reload
  • Cluster integrity, availability, or collected security data could be compromised

General mitigation guidance

Mitigation generally focuses on enforcing a strict filesystem trust boundary

for all cluster-supplied paths.

Common defensive patterns include:

  • Resolve candidate paths and verify that they remain beneath an explicitly authorized directory
  • Reject absolute paths, traversal components, symlink escapes, and unexpected archive members
  • Derive destinations from trusted server-side identifiers rather than peer-controlled filenames
  • Apply strict archive extraction policies and validate metadata before writing files
  • Protect shared cluster keys and limit which systems can participate as peers
  • Run synchronization services with the least filesystem and process privileges possible
  • Separate writable synchronization areas from privileged configuration locations

How teams detect issues like this

Detection approaches may include:

  • Static analysis for path joins involving peer-controlled metadata without canonicalization and containment checks
  • Code review of archive extraction, file synchronization, and configuration replacement logic
  • Rules that flag filesystem writes derived from network or cluster-peer input
  • Runtime monitoring for unexpected writes outside approved synchronization directories
  • File-integrity monitoring for changes to privileged Wazuh configuration files
  • Policy enforcement requiring authenticated peers, protected key storage, and restricted cluster membership

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/commit/7f13682cf5f01f69452f723a608ab2d89cfb2133
github.comgithub.com/wazuh/wazuh/pull/36296
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.6
github.comgithub.com/wazuh/wazuh/releases/tag/v5.0.0-beta3
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-3v57-hgvj-3vj2

Frequently asked

questions

It can be exploitable across the cluster communication boundary when an attacker

controls or compromises a participating peer and obtains the shared Fernet key.

It is not generally an unauthenticated internet-facing attack.

The attacker generally needs the credentials or cryptographic material required

to authenticate as a cluster peer, along with the ability to submit synchronization

data processed by the master.

Treat peer-supplied paths as untrusted, resolve them safely, and enforce that

every resulting path remains inside a dedicated authorized directory before

performing any write or extraction operation.

Use strict archive and path validation, protect cluster authentication keys,

apply least privilege, monitor sensitive configuration files, and enforce

secure filesystem-boundary checks through code review and automated analysis.

Find out what's already
exploitable in your codebase.