/

CVE-2026-61800

Severity:

CRITICAL RISK

(9.1)

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

CVE-2026-61800

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Remote Code Execution and Arbitrary File Modification

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 validation flaw in Wazuh cluster file synchronization allows a party holding the cluster key to write, overwrite, or delete files at attacker-selected locations within /var/ossec on worker nodes. If a selected path is used by a root-privileged component, this may enable remote code execution as root.

Affected context

The vulnerability affects Wazuh cluster deployments using vulnerable file synchronization logic on worker nodes. The risk arises when a cluster peer can submit synchronization requests and the worker relies only on a path-confinement check that keeps destinations under /var/ossec, without confirming that each file remains within the directory associated with its declared cluster item. The same validation gap can affect deletion operations.

Exploit preconditions

  • Attack surface: Wazuh cluster file synchronization between manager and worker nodes
  • Required access: Possession or control of the cluster key, together with the ability to act as a trusted cluster peer
  • Trigger point: Processing of file write, overwrite, or delete synchronization requests on a worker
  • Why exploitation is possible: The worker confirms that a destination remains under /var/ossec but does not consistently verify that it is within the expected item-specific directory

Why this happens

The underlying bug is incomplete path validation in a file synchronization routine. A destination derived from attacker-influenced synchronization metadata is constrained to a broad base directory, but the implementation does not enforce the narrower directory associated with the requested cluster item on every execution branch. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, because a trusted file-management operation can be redirected to unintended locations within the permitted root.

Potential impact

  • An attacker may write or overwrite files within /var/ossec
  • An attacker may delete files required by Wazuh or related services
  • Root-privileged components could execute attacker-controlled content
  • Worker nodes could be fully compromised
  • Monitoring, detection, or response capabilities could be disrupted
  • Attackers could gain opportunities for lateral movement or data tampering

General mitigation guidance

Mitigation generally focuses on enforcing destination-specific path authorization throughout every file synchronization branch.

Common defensive patterns include:

  • Canonicalizing and validating paths against both the permitted base directory and the expected item-specific directory
  • Applying identical authorization checks to create, overwrite, move, and delete operations
  • Rejecting symbolic-link and other filesystem redirection conditions where appropriate
  • Treating cluster credentials as high-value secrets and limiting their distribution
  • Running worker services with only the filesystem and operating-system privileges they require
  • Separating writable synchronization areas from directories consumed by root-privileged processes
  • Auditing synchronized files and alerting on unexpected destinations or changes

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that trace user- or peer-controlled path components into file move, delete, or overwrite operations
  • Code review checks confirming that every control-flow branch applies the same canonical-path and directory-boundary validation
  • Tests involving sibling directories, nested paths, symbolic links, and delete operations
  • Runtime monitoring for unusual file changes under /var/ossec, especially changes to executable, startup, or service-consumed paths
  • Network and identity policy checks that restrict which systems may participate in cluster synchronization
  • Automated security review tools that flag incomplete path validation and inconsistent checks across branches

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/commit/f7f7c4d2d9e683c5d42e997fe7028a3fb2578853
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-3jff-488g-335f

Frequently asked

questions

It can be exploited across the cluster communication path when an attacker can authenticate or otherwise act as a trusted peer using the cluster key. It is not generally an unauthenticated internet-wide issue.

The key prerequisite is control of, or access to, the cluster key and the ability to submit synchronization requests to a worker node.

Enforce canonical destination validation against the expected item-specific directory for every write, move, overwrite, and delete path. Broad confinement to /var/ossec alone is insufficient.

Use least-privilege cluster credentials, apply consistent path authorization across all branches, test filesystem edge cases, and monitor sensitive directories for unexpected synchronization activity.

Find out what's already
exploitable in your codebase.