/

CVE-2026-74043

Severity:

CRITICAL RISK

(9.0)

Path Traversal (CWE-22) in Wazuh File Upload Handlers

CVE-2026-74043

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

CRITICAL RISK

(9.0)

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 critical path traversal vulnerability in Wazuh cluster file-upload handlers allows malicious cluster workers to write files outside intended directories. An attacker who possesses the cluster key may submit crafted DistributedAPI requests that bypass REST controller validation and write files as the Wazuh user.

A critical path traversal vulnerability in Wazuh cluster file-upload handlers allows malicious cluster workers to write files outside intended directories. An attacker who possesses the cluster key may submit crafted DistributedAPI requests that bypass REST controller validation and write files as the Wazuh user.

Affected context

The vulnerability affects Wazuh deployments using vulnerable versions of the cluster file-upload functionality, including the upload_list_file, upload_rule_file, and upload_decoder_file handlers. Risk is present when a malicious or compromised cluster worker can communicate with the manager and the server-side handlers rely on insufficiently constrained filename paths.

The vulnerability affects Wazuh deployments using vulnerable versions of the cluster file-upload functionality, including the upload_list_file, upload_rule_file, and upload_decoder_file handlers. Risk is present when a malicious or compromised cluster worker can communicate with the manager and the server-side handlers rely on insufficiently constrained filename paths.

Exploit preconditions

  • Attack surface: Wazuh cluster DistributedAPI file-upload handlers
  • Required access: Possession of the cluster key and the ability to act as or compromise a cluster worker
  • Trigger point: Processing an upload request for list, rule, or decoder files
  • Why exploitation is possible: Filename path components are not sufficiently constrained by the handler, allowing traversal sequences to escape the intended upload directory after REST-layer validation has been bypassed
  • Attack surface: Wazuh cluster DistributedAPI file-upload handlers
  • Required access: Possession of the cluster key and the ability to act as or compromise a cluster worker
  • Trigger point: Processing an upload request for list, rule, or decoder files
  • Why exploitation is possible: Filename path components are not sufficiently constrained by the handler, allowing traversal sequences to escape the intended upload directory after REST-layer validation has been bypassed

Why this happens

The underlying flaw is improper neutralization of path elements supplied in filenames. The upload handlers trust a path derived from attacker-influenced input without reliably canonicalizing it and enforcing that the resulting path remains within an approved directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.

The underlying flaw is improper neutralization of path elements supplied in filenames. The upload handlers trust a path derived from attacker-influenced input without reliably canonicalizing it and enforcing that the resulting path remains within an approved directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.

Potential impact

  • Arbitrary files may be created or overwritten as the Wazuh user
  • Wazuh configuration, rule, or decoder integrity could be compromised
  • Monitoring results and security detections may be altered or suppressed
  • The attacker could gain additional execution opportunities depending on the files and paths affected
  • Host or cluster compromise could follow if writable files are later trusted or executed by privileged components
  • Arbitrary files may be created or overwritten as the Wazuh user
  • Wazuh configuration, rule, or decoder integrity could be compromised
  • Monitoring results and security detections may be altered or suppressed
  • The attacker could gain additional execution opportunities depending on the files and paths affected
  • Host or cluster compromise could follow if writable files are later trusted or executed by privileged components

General mitigation guidance

Mitigation generally focuses on treating uploaded filenames as untrusted metadata rather than filesystem paths.

Common defensive patterns include:

  • Canonicalizing candidate paths and enforcing containment within a fixed upload directory
  • Rejecting traversal components, absolute paths, and unexpected path separators
  • Generating server-side filenames instead of accepting client-controlled filesystem names
  • Applying strict allowlists for supported file types and upload destinations
  • Separating upload directories from executable, configuration, and sensitive system locations
  • Running Wazuh services with the minimum filesystem permissions required
  • Preserving validation at the final file-handling boundary rather than relying only on upstream REST checks

Mitigation generally focuses on treating uploaded filenames as untrusted metadata rather than filesystem paths.

Common defensive patterns include:

  • Canonicalizing candidate paths and enforcing containment within a fixed upload directory
  • Rejecting traversal components, absolute paths, and unexpected path separators
  • Generating server-side filenames instead of accepting client-controlled filesystem names
  • Applying strict allowlists for supported file types and upload destinations
  • Separating upload directories from executable, configuration, and sensitive system locations
  • Running Wazuh services with the minimum filesystem permissions required
  • Preserving validation at the final file-handling boundary rather than relying only on upstream REST checks

How teams detect issues like this

Detection approaches can include:

  • Static analysis for direct path joins involving request-controlled filenames without canonicalization and containment checks
  • Code review of all DistributedAPI upload handlers and filesystem write operations
  • Runtime monitoring for unexpected writes by the Wazuh service account outside approved directories
  • File-integrity monitoring for changes to Wazuh rules, decoders, lists, and configuration paths
  • Policy enforcement requiring server-generated upload names and restricted destination directories

Automated security scanners and code-review tools may help identify traversal-prone path construction patterns.

Detection approaches can include:

  • Static analysis for direct path joins involving request-controlled filenames without canonicalization and containment checks
  • Code review of all DistributedAPI upload handlers and filesystem write operations
  • Runtime monitoring for unexpected writes by the Wazuh service account outside approved directories
  • File-integrity monitoring for changes to Wazuh rules, decoders, lists, and configuration paths
  • Policy enforcement requiring server-generated upload names and restricted destination directories

Automated security scanners and code-review tools may help identify traversal-prone path construction patterns.

Sources

SourceLink
github.comgithub.com/wazuh/wazuh/releases/tag/v4.14.8
github.comgithub.com/wazuh/wazuh/security/advisories/GHSA-cw26-jj8q-x7w5
vulncheck.comvulncheck.com/advisories/wazuh-4.1.1-before-4.14.8-path-traversal-via-cluster-upload-functions

Frequently asked

questions

Exploitation occurs through Wazuh cluster communication rather than an unauthenticated public endpoint. It may be remotely reachable by a malicious or compromised cluster worker that can communicate with the manager.

The attacker needs the cluster key and the ability to send valid cluster DistributedAPI requests, typically by controlling or compromising a cluster worker.

Treat filenames as untrusted input, use server-controlled destinations and names, canonicalize paths, and verify that every resulting path remains inside an approved directory before writing.

Apply centralized path-validation utilities, enforce least-privilege filesystem permissions, monitor service-account writes, and include traversal-focused checks in code review and automated security testing.

Exploitation occurs through Wazuh cluster communication rather than an unauthenticated public endpoint. It may be remotely reachable by a malicious or compromised cluster worker that can communicate with the manager.

The attacker needs the cluster key and the ability to send valid cluster DistributedAPI requests, typically by controlling or compromising a cluster worker.

Treat filenames as untrusted input, use server-controlled destinations and names, canonicalize paths, and verify that every resulting path remains inside an approved directory before writing.

Apply centralized path-validation utilities, enforce least-privilege filesystem permissions, monitor service-account writes, and include traversal-focused checks in code review and automated security testing.

Find out what's already
exploitable in your codebase.