Goshs WebDAV MOVE Method Bypasses No-Delete Flag
A critical vulnerability (CVE-2026-64863) in the goshs WebDAV server, affecting versions up to 2.1.3, allows an attacker to bypass the `--no-delete` security flag using the `MOVE` HTTP method, leading to unauthorized deletion of source files or overwriting of existing destination files, impacting data integrity.
A critical vulnerability, tracked as CVE-2026-64863, has been discovered in the goshs WebDAV server (versions up to 2.1.3 and 1.1.4). The --no-delete command-line flag, intended to prevent file deletion and overwriting, is ineffective against the WebDAV MOVE HTTP method. This logical flaw allows a remote attacker to bypass a configured security control, enabling unauthorized deletion of source files or overwriting of existing destination files, even when the server operator believes deletion is disabled. The issue stems from the server's wdGuard handler, which incorrectly classifies MOVE as a write-only operation, thus failing to apply the fs.NoDelete check to it. This oversight defeats the security intent of the --no-delete flag, jeopardizing data integrity for systems using goshs to serve files with deletion restrictions.
Attack Chain
- An attacker identifies a
goshsserver running with WebDAV enabled and the--no-deleteflag configured (e.g.,goshs --webdav --no-delete). - The attacker attempts to
DELETEa file, which is correctly blocked by the server, returning an HTTP 403 Forbidden status, confirming the--no-deleteflag is active for theDELETEverb. - The attacker crafts an HTTP
MOVErequest targeting a sensitive file (e.g.,/secret.txt) with aDestinationheader pointing to a new path (e.g.,/gone.txt). - The server processes the
MOVErequest, effectively deleting/secret.txtfrom its original location and moving its content to/gone.txt, bypassing the--no-deletecontrol. - Alternatively, the attacker crafts an HTTP
MOVErequest with anOverwrite: Theader, targeting a source file (e.g.,/gone.txt) and a destination path that corresponds to an existing, sensitive file (e.g.,/victim.txt). - The server processes this
MOVErequest, first invokingRemoveAllon the existing/victim.txtand then moving the content of/gone.txtto/victim.txt. - This results in the original content of
/victim.txtbeing destroyed and replaced with the attacker-controlled content, allowing data destruction or overwriting, despite the--no-deleteflag.
Impact
The impact of CVE-2026-64863 is significant for goshs deployments where file integrity and prevention of deletion/overwriting are paramount. If an operator sets up goshs with --no-delete to protect critical data, such as archived artifacts or confidential documents, any authenticated (or unauthenticated, if no ACLs are in place) WebDAV client can exploit this flaw. This allows an attacker to rename confidential files away, effectively deleting them from their expected location, or worse, overwrite existing sensitive files with arbitrary content. This directly violates the intended security posture, leading to data loss, data corruption, or the unavailability of critical information, undermining the trust in the configured security controls.
Recommendation
- Patch CVE-2026-64863: Update
goshsto a patched version immediately. Monitor the official GitHub repository for releases that address this vulnerability. - Deploy the Sigma rule in this brief: Implement the provided Sigma rule into your SIEM to detect suspicious WebDAV
MOVErequests, particularly those including theOverwrite: Theader. - Enable webserver logging: Ensure comprehensive logging for your
goshsinstances, including HTTP method, URI, status codes, and request headers (specificallyOverwrite). This is crucial for the provided Sigma rule.
Detection coverage 1
Detects CVE-2026-64863 Exploitation - Goshs WebDAV MOVE Bypass
highDetects exploitation of CVE-2026-64863, where the goshs WebDAV server's `--no-delete` flag is bypassed by the `MOVE` HTTP method, potentially leading to unauthorized file deletion or overwrite.
Detection queries are available on the platform. Get full rules →