/

CVE-2026-50138

Severity:

HIGH RISK

(8.1)

Authorization Bypass (CWE-284) in goshs WebDAV Port

CVE-2026-50138

Deferred

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-284

Impact:

Unauthorized file creation, modification, movement, and deletion

Severity:

HIGH RISK

(8.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 versions before 2.1.0 do not apply read-only, upload-only, and no-delete restrictions to the WebDAV listener. An authenticated WebDAV client may therefore perform file-management operations that the operator intended to prevent when WebDAV is enabled.

Affected context

The issue occurs in goshs deployments that enable WebDAV with the -w option while relying on mode-restriction flags such as --read-only, --upload-only, or --no-delete. Those restrictions are applied on the primary HTTP port but may not carry over to the separate WebDAV handler, creating inconsistent authorization behavior across service interfaces.

Exploit preconditions

  • Attack surface: The WebDAV listener exposed by goshs
  • Required access: Valid authentication to the WebDAV service
  • Trigger point: A file-management request handled by the WebDAV port
  • Why exploitation is possible: The WebDAV handler accepts operations without applying the restrictions configured for the primary HTTP service

Why this happens

The vulnerability results from inconsistent authorization enforcement between two service interfaces. The primary HTTP endpoint evaluates mode restrictions, while the WebDAV endpoint is connected directly to a generic WebDAV handler without equivalent policy checks. This maps to CWE-284, Improper Access Control, because authenticated users can perform actions outside the operator-defined authorization policy.

Potential impact

  • An authenticated client may upload files despite read-only settings.
  • An authenticated client may delete files when deletion is intended to be disabled.
  • Files or directories may be created, moved, or copied without authorization.
  • Hosted content could be altered, removed, or replaced.
  • The service may experience data integrity or availability impacts.

General mitigation guidance

Mitigation generally focuses on enforcing the same authorization policy at

every exposed protocol and handler.

Common defensive patterns include:

  • Applying read, write, upload, and deletion controls directly within the WebDAV request path.
  • Using secure-by-default configurations that deny write operations unless explicitly enabled.
  • Reducing trust in client-supplied operation requests by validating each method against server policy.
  • Restricting WebDAV exposure to trusted networks or authenticated principals with the minimum required privileges.
  • Separating read-only and writable service instances when distinct policy boundaries are needed.

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code review of all protocol handlers for consistent authorization checks.
  • Tests that exercise every configured access mode through both HTTP and WebDAV interfaces.
  • Review signals showing a generic handler is mounted without shared policy middleware.
  • Runtime logging and alerting for unexpected PUT, DELETE, MKCOL, MOVE, and COPY requests.
  • Policy enforcement requiring authorization tests for each exposed endpoint and HTTP method.

Automated code review tools may help flag handler paths that bypass centralized access-control logic.

Sources

SourceLink
github.comgithub.com/goshs-labs/goshs/security/advisories/GHSA-3whc-qvhv-xqjp

Frequently asked

questions

It can be exploitable over the network when the WebDAV listener is reachable and

the attacker has valid authentication accepted by the service.

The attacker generally needs authenticated access to the WebDAV endpoint. The

required privileges may depend on the deployment's authentication and network

controls.

Enforce the configured operation restrictions in the WebDAV handler itself and

ensure every exposed interface uses the same authorization policy.

Test security controls across every protocol and listener, use deny-by-default

write permissions, and monitor file-management operations for unexpected

authenticated activity.

Find out what's already
exploitable in your codebase.