/

CVE-2026-46343

Severity:

HIGH RISK

(7.2)

Path Traversal (CWE-22) in Wazuh Cluster Manager Files

CVE-2026-46343

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Deletion

Severity:

HIGH RISK

(7.2)

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 allows a cluster-authenticated node to cause the manager process to delete files outside the intended Wazuh directory. By supplying a crafted filename during cleanup of an unknown task, an attacker may remove configuration, credential, certificate, or ruleset files accessible to the manager.

Affected context

The issue occurs in Wazuh cluster processing when the manager handles a file-receiving cleanup request with an unknown task identifier. It is relevant to deployments where a cluster-authenticated node can submit such requests and the manager process has access to sensitive files. The affected behavior is present in Wazuh releases within the stated vulnerable version ranges.

Exploit preconditions

  • Attack surface: Wazuh cluster communication and file-receiving cleanup handling
  • Required access: Authentication as, or control of, a cluster node
  • Trigger point: Processing a syn_i_w_m_e request associated with an unknown task identifier
  • Attacker-controlled input: A filename supplied to the cleanup operation
  • Why exploitation is possible: The filename is joined to a base path without canonicalization or effective confinement, allowing absolute paths or traversal sequences to escape the intended directory

Why this happens

The vulnerability results from treating an attacker-controlled filename as a trusted filesystem path. The cleanup logic passes that value to path-joining functionality without canonicalizing the result and verifying that it remains within the permitted directory. This insecure path construction pattern maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.

Potential impact

  • Sensitive Wazuh configuration files could be deleted
  • API tokens or authentication material could be invalidated
  • TLS certificates and cluster connectivity files could be removed
  • Ruleset files could be deleted, reducing detection capability
  • The Wazuh manager could become unavailable or fail to start
  • Cluster and API communications could be disrupted

General mitigation guidance

Mitigation generally focuses on enforcing a strict filesystem trust boundary for all received filenames and cleanup targets.

Common defensive patterns include:

  • Canonicalizing candidate paths before filesystem operations
  • Rejecting absolute paths and traversal components
  • Verifying that the resolved target remains beneath an approved directory
  • Using allowlisted filenames or generated identifiers instead of client-supplied paths
  • Separating temporary task files from configuration, credential, and certificate directories
  • Running the manager with the minimum filesystem permissions required
  • Applying protected-file controls and backups for critical configuration assets
  • Treating cluster-node authentication as insufficient authorization for arbitrary file operations

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving path joins with request-derived or message-derived values
  • Code review signals where file deletion occurs without canonicalization and containment checks
  • Tests covering absolute paths, traversal sequences, symbolic links, and unknown task identifiers
  • Cluster audit events involving unusual cleanup requests or unexpected file targets
  • File-integrity monitoring alerts for changes to configuration, credential, certificate, and ruleset files
  • Policy enforcement requiring approved path-handling utilities for filesystem operations

Neutral automated code-review and SAST tools may help identify unsafe path construction patterns during development.

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/commit/90d43547d166cdbe65e9a3d011f946214df9179c
github.comgithub.com/wazuh/wazuh/pull/36060
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.6
github.comgithub.com/wazuh/wazuh/releases/tag/v5.0.0-beta2
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-cqvw-w2rg-327f

Frequently asked

questions

It may be exploitable through Wazuh cluster communication, but exploitation generally requires authentication and sufficient control of a cluster node.

The attacker needs cluster-level authentication or equivalent control that allows them to submit the relevant file-receiving request.

Resolve and validate every filesystem target against a fixed permitted directory, reject absolute and traversal-based paths, and avoid accepting arbitrary filenames for deletion.

Use allowlisted or server-generated file identifiers, apply least-privilege filesystem permissions, add traversal-focused tests, and monitor critical files for unexpected deletion.

Find out what's already
exploitable in your codebase.