zrok 'copy' Path Traversal Vulnerability (CVE-2026-45576)
A path traversal vulnerability exists in zrok copy (CVE-2026-45576) where an attacker-controlled WebDAV or zrok drive can write files outside the destination root by manipulating the DAV `href` response.
A path traversal vulnerability has been identified in the zrok copy command, affecting versions prior to 2.0.3 and versions 0.4.23 through 1.1.11. The vulnerability, tracked as CVE-2026-45576, allows a malicious actor controlling a WebDAV or zrok drive to write files outside the intended destination root on a victim’s system. This is achieved by manipulating the DAV href response to include path traversal sequences like /../ which, when processed by the FilesystemTarget.WriteStream function, allows writing arbitrary files within the sharing user’s credentials. This poses a significant risk of sensitive information being overwritten.
Attack Chain
- Bob sets up a malicious WebDAV server or a zrok drive.
- Bob crafts a DAV
hrefresponse containing path traversal sequences, such as/../outside.txt. - Alice executes the
zrok2 copycommand, specifying Bob’s malicious WebDAV server or zrok drive as the source and a local directory as the destination. - The
zrok2 copyprocess retrieves the directory listing from Bob’s server, including the craftedhrefvalue. - The
zrok2 copyprocess stores the malicious path in the source inventory. - The
FilesystemTarget.WriteStreamfunction receives the malicious path from the source inventory. - The
FilesystemTarget.WriteStreamfunction joins the attacker-controlled path with the target root path. - The file
outside.txtis created (or overwritten) outside Alice’s specified target directory, with Alice’s credentials.
Impact
Successful exploitation of CVE-2026-45576 allows a malicious user with access to a zrok share to traverse the directory tree arbitrarily on the system where the zrok copy command is executed. This can lead to the overwriting of sensitive information, potentially causing data loss, system instability, or privilege escalation if critical system files are targeted. The number of victims and the scope of impact depend on the privileges of the user running zrok copy and the contents of the files that are overwritten.
Recommendation
- Upgrade to
zrok/v2version 2.0.3 or later to patch CVE-2026-45576. - Upgrade
zrokversions between 0.4.23 and 1.1.11 (inclusive) to a patched version. - Monitor file creation events for unexpected write operations outside the intended target directory using a file integrity monitoring system, and deploy the provided Sigma rules.
Detection coverage 2
Detect CVE-2026-45576 Exploitation — zrok Path Traversal File Write
highDetects CVE-2026-45576 exploitation — File creation outside the intended zrok target directory due to path traversal.
Detect CVE-2026-45576 Exploitation — zrok Path Traversal File Write (Linux)
highDetects CVE-2026-45576 exploitation — File creation outside the intended zrok target directory due to path traversal (Linux).
Detection queries are available on the platform. Get full rules →