CVE-2026-30893
Wazuh path traversal in cluster sync allows RCE by an authenticated peer.
- CVSS 9.9
- CWE-22
- Input Validation and Sanitization
- Remote
Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 4.4.0 to before version 4.14.4, a path traversal vulnerability in Wazuh's cluster synchronization extraction routine allows an authenticated cluster peer to write arbitrary files outside the intended extraction directory on other cluster nodes. This can be escalated to code execution in the Wazuh service context by overwriting Python modules loaded by Wazuh components (proof of concept available as separate attachment). In deployments where the cluster daemon runs with elevated privileges, system-level compromise is possible. This issue has been patched in version 4.14.4.
- CWE
- CWE-22
- CVSS base score
- 9.9
- Published
- 2026-04-29
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Wazuh
Solution
Upgrade to Wazuh version 4.14.4 or later.
Vulnerable code sample
import os
import tarfile
def unsafe_extract_cluster_files(tar_bundle_path, extraction_directory):
"""
Represents the vulnerable file extraction routine.
It extracts a tar file without validating member paths, allowing traversal.
"""
with tarfile.open(tar_bundle_path, "r:*") as tar:
for member in tar.getmembers():
# The vulnerability is here: The member name is joined directly
# to the base path. An attacker can use '..' in the member
# name to write files outside of the intended extraction_directory.
destination_path = os.path.join(extraction_directory, member.name)
# The extraction proceeds without checking if destination_path is safe.
if member.isfile():
# Ensure parent directory exists, creating it if necessary.
# This also helps the traversal attack succeed.
parent_dir = os.path.dirname(destination_path)
if not os.path.exists(parent_dir):
os.makedirs(parent_dir)
# Extract the file to the potentially malicious path.
source_file = tar.extractfile(member)
if source_file:
with open(destination_path, "wb") as dest_file:
dest_file.write(source_file.read())
elif member.isdir():
# Create directories as specified in the archive.
if not os.path.exists(destination_path):
os.makedirs(destination_path)Patched code sample
import os
import tarfile
def safe_extract_archive(tar_path, destination_dir):
"""
Safely extracts a tar archive to a destination directory, preventing path
traversal vulnerabilities.
Args:
tar_path (str): The path to the tar archive.
destination_dir (str): The directory where contents should be extracted.
"""
# Resolve the destination directory to an absolute path to establish a secure root.
abs_destination_dir = os.path.abspath(destination_dir)
with tarfile.open(tar_path, "r:*") as tar:
for member in tar.getmembers():
# Build the full, intended destination path for the member.
member_destination = os.path.join(abs_destination_dir, member.name)
# Normalize the path to resolve ".." components and other indirections.
abs_member_destination = os.path.abspath(member_destination)
# THE FIX:
# Check if the resolved path of the member is still within the intended
# destination directory. This prevents extraction outside of the secure root.
if not abs_member_destination.startswith(abs_destination_dir + os.sep):
# This check prevents writing files using paths like '../etc/passwd'.
print(f"WARNING: Skipping unsafe member path '{member.name}'")
continue
# If the path is safe, proceed with extracting this specific member.
# Using extract() on a per-member basis allows for this validation step,
# unlike a blind extractall() call.
tar.extract(member, path=destination_dir)Payload
I cannot provide a functional exploit payload. My purpose is to be helpful and harmless, and generating or distributing malicious code, including exploit payloads for vulnerabilities, is a direct violation of my safety policies. This type of information can be used to cause significant harm to computer systems and networks.
Instead, I strongly advise any administrator of a vulnerable Wazuh system to immediately upgrade to version 4.14.4 or a later patched version to mitigate this critical vulnerability.
Cite this entry
@misc{vaitp:cve202630893,
title = {{Wazuh path traversal in cluster sync allows RCE by an authenticated peer.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-30893},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-30893/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
