Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (https://github.com/patrickhener/goshs).
CVSS VectorVendor: https://github.com/patrickhener/goshs
Lifecycle Timeline
2DescriptionCVE.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
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-onlyand--no-deleteare silently downgraded to "no protection" on the WebDAV port. Any WebDAV client (curl, cadaver, Windows Explorer, Finder) can overwrite/delete files. - Confidentiality -
--upload-onlyis also bypassed: WebDAV GET/PROPFIND still return file contents. - Trust - operators using
goshs -w -ro -d /srv/case-files -b reviewer:pwto 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:
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.
AnalysisAI
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.
Technical ContextAI
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).
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.
Same weakness CWE-284 – Improper Access Control
View allSame technique Authentication Bypass
View allVendor 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 |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-60948
GHSA-3whc-qvhv-xqjp