/

CVE-2026-64863

Severity:

CRITICAL RISK

(9.1)

Authorization Bypass (CWE-284) in goshs WebDAV MOVE

CVE-2026-64863

Deferred

Vulnerability type

Category:

Authorization Bypass / Improper Access Control

CWE:

CWE-284

Impact:

Unauthorized File Deletion and Overwrite

Severity:

CRITICAL RISK

(9.1)

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

goshs incorrectly treats the WebDAV MOVE method as write-only and fails to honor the --no-delete restriction for delete-like operations.

A WebDAV client can use MOVE requests with Overwrite: T to delete or overwrite existing files, even when deletion should be disabled, leading to unauthorized file modification or loss.

goshs incorrectly treats the WebDAV MOVE method as write-only and fails to honor the --no-delete restriction for delete-like operations.

A WebDAV client can use MOVE requests with Overwrite: T to delete or overwrite existing files, even when deletion should be disabled, leading to unauthorized file modification or loss.

Affected context

This vulnerability appears in goshs instances that:

  • Expose the WebDAV interface for file operations
  • Rely on the --no-delete option (or similar configuration) to prevent file deletion
  • Run versions prior to 2.1.4 where MOVE is treated as a purely write operation

In these configurations, operators may assume files cannot be deleted, while WebDAV MOVE can still be used to remove or overwrite content.

This vulnerability appears in goshs instances that:

  • Expose the WebDAV interface for file operations
  • Rely on the --no-delete option (or similar configuration) to prevent file deletion
  • Run versions prior to 2.1.4 where MOVE is treated as a purely write operation

In these configurations, operators may assume files cannot be deleted, while WebDAV MOVE can still be used to remove or overwrite content.

Exploit preconditions

  • Attack surface: HTTP/WebDAV endpoint exposed by goshs
  • Required access: Ability to send authenticated or unauthenticated HTTP/WebDAV requests, depending on how goshs is configured (e.g., network reachability, optional auth)
  • Trigger point: Issuing a WebDAV MOVE request with Overwrite: T targeting existing files or paths protected by --no-delete
  • Why exploitation is possible: The wdGuard logic classifies MOVE as a write-only method and fails to tie it to deletion semantics, so delete restrictions are not applied to MOVE operations.
  • Attack surface: HTTP/WebDAV endpoint exposed by goshs
  • Required access: Ability to send authenticated or unauthenticated HTTP/WebDAV requests, depending on how goshs is configured (e.g., network reachability, optional auth)
  • Trigger point: Issuing a WebDAV MOVE request with Overwrite: T targeting existing files or paths protected by --no-delete
  • Why exploitation is possible: The wdGuard logic classifies MOVE as a write-only method and fails to tie it to deletion semantics, so delete restrictions are not applied to MOVE operations.

Why this happens

The core issue is improper authorization and method handling for WebDAV operations, mapping to CWE-284: Improper Access Control.

The wdGuard component enforces deletion restrictions based on HTTP methods, but MOVE is incorrectly treated as a simple write, ignoring its inherent ability to remove or overwrite existing resources.

As a result, the access control policy (--no-delete) is inconsistently applied: direct DELETE may be blocked, while a semantically equivalent MOVE operation is permitted, creating a gap between intended and actual protections.

The core issue is improper authorization and method handling for WebDAV operations, mapping to CWE-284: Improper Access Control.

The wdGuard component enforces deletion restrictions based on HTTP methods, but MOVE is incorrectly treated as a simple write, ignoring its inherent ability to remove or overwrite existing resources.

As a result, the access control policy (--no-delete) is inconsistently applied: direct DELETE may be blocked, while a semantically equivalent MOVE operation is permitted, creating a gap between intended and actual protections.

Potential impact

  • Attackers could delete existing files by moving them over other resources with Overwrite: T
  • Attackers could overwrite existing files, potentially replacing legitimate content with malicious payloads
  • Loss of critical data stored on the server due to unintended deletions
  • Disruption of red-team or development workflows relying on goshs as a trusted file server
  • Facilitation of further compromise if overwritten files are scripts, binaries, or configuration artifacts executed by other systems
  • Attackers could delete existing files by moving them over other resources with Overwrite: T
  • Attackers could overwrite existing files, potentially replacing legitimate content with malicious payloads
  • Loss of critical data stored on the server due to unintended deletions
  • Disruption of red-team or development workflows relying on goshs as a trusted file server
  • Facilitation of further compromise if overwritten files are scripts, binaries, or configuration artifacts executed by other systems

General mitigation guidance

Effective mitigation focuses on enforcing consistent access control across all methods that can change or remove resources:

  • Treat WebDAV MOVE, COPY, and similar methods according to their full semantics, applying any delete or overwrite restrictions uniformly.
  • Centralize authorization checks so policy decisions are based on the effect of an operation (e.g., "can this remove or overwrite a file?") rather than only the HTTP verb.
  • Where possible, configure goshs (or any file server) to operate with minimal privileges on the filesystem, isolating served content from critical system paths.
  • Use strong authentication and network-level controls (VPNs, firewalls, IP allowlists) to limit who can reach the WebDAV interface.
  • Prefer secure-by-default configurations where destructive operations are disabled unless explicitly required, and ensure that any "no delete" or "read-only" modes are comprehensively tested across all supported file operations.

Effective mitigation focuses on enforcing consistent access control across all methods that can change or remove resources:

  • Treat WebDAV MOVE, COPY, and similar methods according to their full semantics, applying any delete or overwrite restrictions uniformly.
  • Centralize authorization checks so policy decisions are based on the effect of an operation (e.g., "can this remove or overwrite a file?") rather than only the HTTP verb.
  • Where possible, configure goshs (or any file server) to operate with minimal privileges on the filesystem, isolating served content from critical system paths.
  • Use strong authentication and network-level controls (VPNs, firewalls, IP allowlists) to limit who can reach the WebDAV interface.
  • Prefer secure-by-default configurations where destructive operations are disabled unless explicitly required, and ensure that any "no delete" or "read-only" modes are comprehensively tested across all supported file operations.

How teams detect issues like this

Detection strategies typically focus on both code-level and operational signals:

  • Static analysis / code review:
  • Look for authorization logic that keys off HTTP methods without considering semantic equivalence (e.g., protecting DELETE but not WebDAV MOVE or COPY).
  • Flag controllers or handlers where "write-only" classification is applied without analyzing whether operations can remove or overwrite resources.
  • Review guard functions (such as wdGuard) to ensure configuration flags like --no-delete are enforced consistently.
  • Runtime monitoring:
  • Enable access logging that records WebDAV methods (MOVE, COPY, PROPFIND, etc.) and request headers such as Overwrite.
  • Monitor for unexpected MOVE requests targeting sensitive or supposedly protected paths.
  • Use file integrity monitoring on directories served by goshs to detect unauthorized deletions or modifications.
  • Security testing:
  • Incorporate WebDAV method fuzzing into penetration tests and CI security checks to confirm that "no-delete" or "read-only" modes cannot be bypassed via alternate verbs.

Detection strategies typically focus on both code-level and operational signals:

  • Static analysis / code review:
  • Look for authorization logic that keys off HTTP methods without considering semantic equivalence (e.g., protecting DELETE but not WebDAV MOVE or COPY).
  • Flag controllers or handlers where "write-only" classification is applied without analyzing whether operations can remove or overwrite resources.
  • Review guard functions (such as wdGuard) to ensure configuration flags like --no-delete are enforced consistently.
  • Runtime monitoring:
  • Enable access logging that records WebDAV methods (MOVE, COPY, PROPFIND, etc.) and request headers such as Overwrite.
  • Monitor for unexpected MOVE requests targeting sensitive or supposedly protected paths.
  • Use file integrity monitoring on directories served by goshs to detect unauthorized deletions or modifications.
  • Security testing:
  • Incorporate WebDAV method fuzzing into penetration tests and CI security checks to confirm that "no-delete" or "read-only" modes cannot be bypassed via alternate verbs.

Sources

SourceLink
github.comgithub.com/goshs-labs/goshs/commit/0444ac6b1a8176ddae70d940adf7a26b2e5a6c29
github.comgithub.com/goshs-labs/goshs/releases/tag/v2.1.4
github.comgithub.com/goshs-labs/goshs/security/advisories/GHSA-hq33-8jgp-8qq3

Frequently asked

questions

Yes, if the goshs WebDAV service is reachable over the network, an attacker who can send HTTP/WebDAV requests can attempt to exploit this issue. The exact exposure depends on how goshs is bound (e.g., localhost vs public interface) and whether additional authentication is in place.

An attacker needs the same level of network and authentication access that a legitimate WebDAV client would have. If goshs is exposed without strong authentication on a reachable interface, even an unauthenticated remote user may be able to delete or overwrite files via MOVE.

The safest pattern is to ensure that all methods capable of removing or overwriting resources are subject to the same access control checks as explicit delete operations. Authorization should be defined in terms of the operation's effect (delete, overwrite, create) rather than just the HTTP verb, with a unified policy layer enforcing configuration flags like --no-delete.

Prevention involves designing access control with a comprehensive view of protocol semantics: map out every supported method (including WebDAV and extension verbs), define their effects, and enforce policies consistently. Augment this with secure defaults, thorough regression tests for "no delete"/"read-only" modes, and regular security reviews focused on alternative or less commonly used HTTP methods.

Yes, if the goshs WebDAV service is reachable over the network, an attacker who can send HTTP/WebDAV requests can attempt to exploit this issue. The exact exposure depends on how goshs is bound (e.g., localhost vs public interface) and whether additional authentication is in place.

An attacker needs the same level of network and authentication access that a legitimate WebDAV client would have. If goshs is exposed without strong authentication on a reachable interface, even an unauthenticated remote user may be able to delete or overwrite files via MOVE.

The safest pattern is to ensure that all methods capable of removing or overwriting resources are subject to the same access control checks as explicit delete operations. Authorization should be defined in terms of the operation's effect (delete, overwrite, create) rather than just the HTTP verb, with a unified policy layer enforcing configuration flags like --no-delete.

Prevention involves designing access control with a comprehensive view of protocol semantics: map out every supported method (including WebDAV and extension verbs), define their effects, and enforce policies consistently. Augment this with secure defaults, thorough regression tests for "no delete"/"read-only" modes, and regular security reviews focused on alternative or less commonly used HTTP methods.

Find out what's already
exploitable in your codebase.