Skip to main content

goshs CVE-2026-50138

| EUVDEUVD-2026-60948 HIGH
Improper Access Control (CWE-284)
2026-07-01 https://github.com/patrickhener/goshs GHSA-3whc-qvhv-xqjp
8.1
CVSS 3.1 · Vendor: https://github.com/patrickhener/goshs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed WebDAV port (-wp)
  2. Delivery
    Authenticate with valid BasicAuth credentials
  3. Exploit
    Send PUT/DELETE/MKCOL request
  4. Execution
    Bypass unenforced read-only/no-delete guard
  5. Impact
    Overwrite or delete protected files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Access control enforcement
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

goshs must be started with the WebDAV listener enabled (-w, exposing the -wp port) AND with at least one mode-restriction flag set (--read-only/-ro, --upload-only, or --no-delete) - the vulnerability is precisely the failure to enforce those flags on WebDAV. The attacker must be able to reach the WebDAV port and, if BasicAuth is configured (-b), must present valid credentials (PR:L reflects this); with no -b flag, no authentication is needed. Limiting factors that reduce realistic risk: the operator must have deliberately enabled both WebDAV and a restriction flag (non-default combination), the WebDAV port must be network-reachable by the attacker, and any configured IP whitelist (IPWhitelistMiddleware) further constrains which clients can connect. Confidentiality impact specifically requires --upload-only mode to be in use.

Impact

The provided CVSS 3.1 vector (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N, base 8.1) indicates a network-reachable, low-complexity attack requiring low privileges (PR:L) - consistent with the described requirement that the attacker hold valid WebDAV credentials when BasicAuth is configured. No EPSS score and no CISA KEV status were provided, so real-world exploitation-probability signals and active-exploitation confirmation are both absent; this should be treated as a POC-backed but not KEV-listed issue. The genuine risk is heavily context-dependent: goshs is a niche operator tool, and exploitation presupposes an operator who both enabled WebDAV (-w) AND set a restriction flag AND exposed the WebDAV port to an attacker who already holds credentials (or ran without auth). The C:H rating is arguable - confidentiality impact only materializes in --upload-only mode; the dominant and reliable impact is integrity (arbitrary write/delete). Net: a real, easily-triggered logic bug worth patching for anyone relying on these flags, but limited blast radius rather than a mass-exploitation threat.

Exploit ScenarioDerived

An operator runs goshs -w -ro -d /srv/case-files -b reviewer:pw to hand engagement artifacts to a reviewer, believing the directory is immutable. The reviewer (or anyone who obtains the reviewer:pw credentials) instead points a WebDAV client at the -wp port and issues PUT, DELETE, or MKCOL requests - as shown in the published PoC, these return 201/204 and silently overwrite or delete files despite -ro. Given AV:N/AC:L, the requests are trivial single-line curl commands and require no special tooling beyond valid credentials.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 01, 2026

Access-control bypass in the goshs WebDAV listener (Go package goshs.de/goshs/v2, all releases through v2.0.9) lets an authenticated WebDAV client write, delete, and create files even when the operator started the server with --read-only, --upload-only, or --no-delete. The mode-restriction flags are enforced only on the primary HTTP port, while the WebDAV port (-w/-wp) wires requests straight into golang.org/x/net/webdav.Handler with no guard, so PUT/DELETE/MKCOL/MOVE/COPY succeed regardless of operator intent. A working proof of concept is published in the GitHub Security Advisory (GHSA-3whc-qvhv-xqjp); publicly available exploit code exists, but there is no public exploit identified as being used in active attacks.

RemediationAI

No vendor-released patch version is identified in the available data; the advisory (GHSA-3whc-qvhv-xqjp) documents an upstream suggested fix - a small http.HandlerFunc placed in front of wdHandler that maps WebDAV verbs (PUT/MKCOL/MOVE/COPY, DELETE, GET/PROPFIND/HEAD) to the existing fs.ReadOnly/fs.UploadOnly/fs.NoDelete flags - but a released patched build is not independently confirmed, so operators should upgrade to the first goshs release above v2.0.9 that references this advisory once published and verify the fix. Until a patched release is available, the effective compensating control is to not rely on WebDAV for restricted directories: disable the WebDAV listener (omit -w) and serve restricted content over the HTTP port only, where the flags are enforced (trade-off: loses native WebDAV client support such as Windows Explorer/Finder). If WebDAV must stay enabled, restrict reachability of the WebDAV port (-wp) using goshs's IP whitelist and/or an external firewall so only trusted clients can connect (trade-off: does not stop an authorized-but-malicious WebDAV user), and treat any directory exposed over WebDAV as mutable regardless of the flag settings. Monitor https://github.com/patrickhener/goshs for the patched tag.

Affected VersionsENISA

goshs < 2.1.0

Affected Packages

go goshs.de/goshs no fix
go goshs.de/goshs/v2 fix: 2.1.0
euvd goshs fix: 2.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

goshs is a lightweight Go-based HTTP/WebDAV file server commonly used by penetration testers and IT staff for quick file transfer and artifact delivery. The flaw is an instance of CWE-284 (Improper Access Control): two independent request routers exist in httpserver/server.go - the HTTP mux (lines 134-204) applies fs.ReadOnly/fs.UploadOnly/fs.NoDelete checks on every state-changing route, whereas the WebDAV mux (lines 207-238) registers only IPWhitelistMiddleware, ServerHeaderMiddleware, and optionally BasicAuthMiddleware before delegating to the upstream x/net/webdav.Handler. Because the WebDAV handler natively implements the full DAV verb set (PUT, DELETE, MKCOL, MOVE, COPY, PROPFIND), and no verb-to-flag mapping sits in front of it, the restriction flags are simply never consulted on that port. The CPE identifier is pkg:go/goshs.de_goshs_v2 (module github.com/patrickhener/goshs).

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/patrickhener/goshs) PRIMARY 8.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.1 HIGH

Authenticated WebDAV write/delete gives high integrity impact (I:H); confidentiality is only partial and mode-specific (C:L); PR:L reflects required BasicAuth credentials; network vector, low complexity.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/patrickhener/goshs).

CVSS VectorVendor: https://github.com/patrickhener/goshs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags

Ecosystem: Go Package: goshs.de/goshs/v2 (github.com/patrickhener/goshs) Affected: <= v2.0.9 (every release that ships the WebDAV handler)

Summary

When goshs is launched with WebDAV enabled (-w), the mode-restriction flags --read-only, --upload-only, and --no-delete are enforced only on the primary HTTP port. The WebDAV port is wired straight to golang.org/x/net/webdav.Handler with no equivalent guard, so an authenticated WebDAV client can PUT, DELETE, MKCOL, MOVE, and COPY despite the operator's stated intent.

Details

httpserver/server.go:207-238 - the WebDAV mux registers only IPWhitelistMiddleware, ServerHeaderMiddleware, and optionally BasicAuthMiddleware. There is no fs.ReadOnly || fs.UploadOnly || fs.NoDelete check on the WebDAV path. The HTTP mux in the same file (lines 134-204) does check these flags on every state-changing route.

Proof of concept

bash
mkdir -p /tmp/r && echo secret > /tmp/r/x.txt
goshs -p 18000 -wp 18001 -w -ro -d /tmp/r -b admin:pw &

curl -u admin:pw -X PUT    http://localhost:18000/y.txt --data x
# 403  (HTTP enforces -ro)
curl -u admin:pw -X PUT    http://localhost:18001/y.txt --data x
# 201  (WebDAV writes anyway)
curl -u admin:pw -X DELETE http://localhost:18001/x.txt
# 204  (WebDAV deletes anyway)
curl -u admin:pw -X MKCOL  http://localhost:18001/pwned/
# 201  (WebDAV creates dir)

Impact

  • Integrity - --read-only and --no-delete are silently downgraded to "no protection" on the WebDAV port. Any WebDAV client (curl, cadaver, Windows Explorer, Finder) can overwrite/delete files.
  • Confidentiality - --upload-only is also bypassed: WebDAV GET/PROPFIND still return file contents.
  • Trust - operators using goshs -w -ro -d /srv/case-files -b reviewer:pw to deliver engagement artifacts believe the directory is immutable. It isn't.

Suggested fix

Add a small http.HandlerFunc in front of wdHandler that maps WebDAV verbs to the existing mode flags:

go
wdGuard := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    switch r.Method {
    case http.MethodPut, "MKCOL", "MOVE", "COPY":
        if fs.ReadOnly || fs.UploadOnly { http.Error(w, "read-only", 403); return }
    case http.MethodDelete:
        if fs.ReadOnly || fs.UploadOnly || fs.NoDelete { http.Error(w, "delete disabled", 403); return }
    case http.MethodGet, "PROPFIND", "HEAD":
        if fs.UploadOnly { http.Error(w, "upload-only", 403); return }
    }
    wdHandler.ServeHTTP(w, r)
})

Add regression tests in integration/functions.go covering each mode flag × each WebDAV verb.

Reporter: Nishant Verma. Reproduced live against goshs v2.0.9 (commit 8fc1e91) on 2026-05-27.

Executive ViewAI

Why It Matters

goshs WebDAV server versions 2.0.9 and earlier contain an access-control bypass enabling authenticated users to circumvent intended file-operation restrictions (read-only, upload-only, no-delete modes), creating risk of unauthorized file modification and deletion for organizations relying on these safeguards.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable WebDAV listener (-w/-wp) if operationally optional; (2) Restrict WebDAV port access to trusted networks via firewall; (3) Audit active WebDAV accounts and disable unnecessary credentials; (4) Monitor file-access logs for unexpected write, delete, or create operations; (5) If multi-tenant, implement separate credential management for WebDAV access.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Low
niche pentester/IT file-transfer tool, limited enterprise production footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy