{"id":"GHSA-3whc-qvhv-xqjp","revision":null,"records":[{"revision":"f9191ce273fb4e0e94a51bf679e7c8e8","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-50138","aliases":[],"title":"goshs: WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags","description":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, 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. Version 2.1.0 patches the issue.","state":0,"publishedAt":"2026-08-18T14:59:43.416+00:00","modifiedAt":"2026-08-19T14:30:24.965+00:00","affected":[{"ecosystem":"Vendor product","name":"goshs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"patrickhener\",\n                    \"product\": \"goshs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.1.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"severity":"HIGH"}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-3whc-qvhv-xqjp"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-50138","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-50138","identifiers":["CVE-2026-50138"]},"retained":false,"historicalAffected":[]},{"revision":"1d83102f0ff44f7ea6f2e27c4e2fca60","observedAt":"2026-11-07T11:32:48.377+00:00","statement":{"source":"euvd","id":"EUVD-2026-60948","aliases":["CVE-2026-50138","GHSA-3whc-qvhv-xqjp"],"title":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, 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.…","description":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, 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. Version 2.1.0 patches the issue.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"severity":null}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-3whc-qvhv-xqjp"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-60948","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 18, 2026, 2:59:43 PM","dateUpdated":"Aug 19, 2026, 2:30:24 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-60948","identifiers":["EUVD-2026-60948","CVE-2026-50138","GHSA-3whc-qvhv-xqjp"]},"retained":false,"historicalAffected":[]},{"revision":"04835388b45d462bba49d4ccff975b72","observedAt":"2026-10-25T12:17:38.331+00:00","statement":{"source":"nvd","id":"CVE-2026-50138","aliases":[],"title":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, 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.…","description":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.1.0, 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. Version 2.1.0 patches the issue.","state":0,"publishedAt":"2026-08-18T15:16:54.58+00:00","modifiedAt":"2026-10-22T22:10:00.25+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"severity":"HIGH"}],"references":["https://github.com/goshs-labs/goshs/security/advisories/GHSA-3whc-qvhv-xqjp"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-50138","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-284"],"productCriteria":[],"sourceDates":{"published":"2026-08-18T15:16:54.580","lastModified":"2026-10-22T22:10:00.250"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-50138","identifiers":["CVE-2026-50138"]},"retained":false,"historicalAffected":[]},{"revision":"6bd10702c33745b4a48b8b1b84d5656d","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-3whc-qvhv-xqjp","aliases":["CVE-2026-50138","GO-2026-5878"],"title":"goshs: WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags","description":"# WebDAV listener ignores `--read-only`, `--upload-only`, and `--no-delete` mode flags\n\n**Ecosystem:** Go\n**Package:** `goshs.de/goshs/v2` (`github.com/patrickhener/goshs`)\n**Affected:** `<= v2.0.9` (every release that ships the WebDAV handler)\n\n## Summary\n\nWhen `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.\n\n## Details\n\n[`httpserver/server.go:207-238`](https://github.com/patrickhener/goshs/blob/v2.0.9/httpserver/server.go#L207-L238) — 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.\n\n## Proof of concept\n\n```bash\nmkdir -p /tmp/r && echo secret > /tmp/r/x.txt\ngoshs -p 18000 -wp 18001 -w -ro -d /tmp/r -b admin:pw &\n\ncurl -u admin:pw -X PUT    http://localhost:18000/y.txt --data x   # 403  (HTTP enforces -ro)\ncurl -u admin:pw -X PUT    http://localhost:18001/y.txt --data x   # 201  (WebDAV writes anyway)\ncurl -u admin:pw -X DELETE http://localhost:18001/x.txt            # 204  (WebDAV deletes anyway)\ncurl -u admin:pw -X MKCOL  http://localhost:18001/pwned/           # 201  (WebDAV creates dir)\n```\n\n## Impact\n\n- **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.\n- **Confidentiality** — `--upload-only` is also bypassed: WebDAV GET/PROPFIND still return file contents.\n- **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.\n\n## Suggested fix\n\nAdd a small `http.HandlerFunc` in front of `wdHandler` that maps WebDAV verbs to the existing mode flags:\n\n```go\nwdGuard := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n    switch r.Method {\n    case http.MethodPut, \"MKCOL\", \"MOVE\", \"COPY\":\n        if fs.ReadOnly || fs.UploadOnly { http.Error(w, \"read-only\", 403); return }\n    case http.MethodDelete:\n        if fs.ReadOnly || fs.UploadOnly || fs.NoDelete { http.Error(w, \"delete disabled\", 403); return }\n    case http.MethodGet, \"PROPFIND\", \"HEAD\":\n        if fs.UploadOnly { http.Error(w, \"upload-only\", 403); return }\n    }\n    wdHandler.ServeHTTP(w, r)\n})\n```\n\nAdd regression tests in `integration/functions.go` covering each mode flag × each WebDAV verb.\n\nReporter: Nishant Verma. Reproduced live against `goshs v2.0.9` (commit `8fc1e91`) on 2026-05-27.","state":0,"publishedAt":"2026-07-01T21:56:40+00:00","modifiedAt":"2026-07-07T16:11:06.128102+00:00","affected":[{"ecosystem":"Go","name":"goshs.de/goshs/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-3whc-qvhv-xqjp","https://github.com/patrickhener/goshs"],"sourceUrl":"https://github.com/advisories/GHSA-3whc-qvhv-xqjp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-3whc-qvhv-xqjp","identifiers":["GHSA-3whc-qvhv-xqjp","CVE-2026-50138","GO-2026-5878"]},"retained":false,"historicalAffected":[]},{"revision":"13778ce6078c40658f08f56017a76de3","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5878","aliases":["CVE-2026-50138","GHSA-3whc-qvhv-xqjp"],"title":"goshs: WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags in goshs.de/goshs","description":"goshs: WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags in goshs.de/goshs","state":0,"publishedAt":"2026-07-07T15:26:37+00:00","modifiedAt":"2026-07-07T16:01:31.26461+00:00","affected":[{"ecosystem":"Go","name":"goshs.de/goshs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"goshs.de/goshs/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-3whc-qvhv-xqjp"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5878","license":"OSV · upstream source license applies","key":"osv:GO-2026-5878","identifiers":["GO-2026-5878","CVE-2026-50138","GHSA-3whc-qvhv-xqjp"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-08T07:06:42.2208240+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-08T07:06:42.220824+00:00","lastSuccessAt":"2026-11-08T07:06:42.3839308+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.3839321+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-eaa64dac63caa79c8d4905619258c41c51b39e461b996124e1a21b5e85e7e738-1167b7290e843ce2b7ccffc299ffe73e10a65833db7c7e05840c0f2de122f77a","complete":true,"records":421096,"lastAttemptAt":"2026-11-08T07:06:41.7244391+00:00","lastSuccessAt":"2026-11-08T07:06:41.6928813+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.7244391+00:00","snapshotPublishedAt":"2026-11-08T06:27:58+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ce0df89a405747cda5b7c61ae0b48fb2","complete":true,"records":13633,"lastAttemptAt":"2026-11-08T07:07:08.1374238+00:00","lastSuccessAt":"2026-11-08T05:08:40.263+00:00","error":null,"lastVerifiedAt":"2026-11-08T05:08:40.263+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-08T07:06:42.2208240+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-08T07:06:42.220824+00:00","lastSuccessAt":"2026-11-08T07:06:42.3846752+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.3846753+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e34772fb6aa347ef91ff9834fc6c39c0","complete":true,"records":13645,"lastAttemptAt":"2026-11-08T07:07:07.5391052+00:00","lastSuccessAt":"2026-11-08T07:07:07.536+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:07:07.536+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-08T07:06:42.0654366+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.0654366+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-08T07:06:41.8609231+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.8609231+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-08T07:06:42.179579+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:42.179579+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-40ad6183a951565ace1520a9b4d631e1d0bfb1d4bf7c5574c375032559f3ff53","complete":true,"records":231292,"lastAttemptAt":"2026-11-08T07:06:41.9639328+00:00","lastSuccessAt":"2026-11-07T10:29:00.4821259+00:00","error":null,"lastVerifiedAt":"2026-11-08T07:06:41.9639328+00:00","snapshotPublishedAt":"2026-11-07T09:32:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}