{"id":"CVE-2026-66063","aliases":["CVE-2026-66063","GHSA-wg2q-39h6-66x9","GO-2026-6137"],"related":[],"kind":"vulnerability","state":"published","title":"goshs has a Path Traversal issue","summary":"goshs is a feature-rich single-binary file server for red teamers and developers. Prior to 2.1.5, the httpserver/updown.go multipart upload handler split part.FileName() on / but did not reject .., allowing an unauthenticated upload with filename .. to create a file outside the served tree. This issue is fixed in version 2.1.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"goshs is a feature-rich single-binary file server for red teamers and developers. Prior to 2.1.5, the httpserver/updown.go multipart upload handler split part.FileName() on / but did not reject .., allowing an unauthenticated upload with filename .. to create a file outside the served tree. This issue is fixed in version 2.1.5.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe multipart upload filename fix splits on the path separator but never rejects dot-dot, allowing a write outside the served tree.\n\n## Finding (Medium): upload filename escapes the served tree (residual of CVE-2026-35393)\n\nThe multipart filename fix (updown.go lines 135-136) splits on the path separator but never rejects \"..\". Uploading with filename=\"..\" results in os.Create against the parent of the upload folder with a trailing marker character, outside the served tree, and the subsequent failed rename leaves that file behind. Verified: a file containing ESCAPED_WRITE_PROOF was written outside the webroot, unauthenticated, with the default configuration. Not claimed: a Windows-specific variant (Go's Part.FileName() already applies filepath.Base).\n\n## Suggested fixes\n\n1. Reject any upload filename that is \"..\", is empty after sanitisation, or resolves outside the upload folder; validate the final resolved destination rather than only transforming the input.\n\n## Tooling\n\nAI assistance was used while investigating. The finding was reproduced against a running server on loopback.","format":"markdown","source":"ghsa"},{"lang":"en","text":"goshs has a Path Traversal issue in github.com/patrickhener/goshs","format":"markdown","source":"go"},{"lang":"es","text":"goshs es un servidor de archivos binario único con muchas funciones para equipos rojos y desarrolladores. Antes de la versión 2.1.5, el gestor de carga multipart de httpserver/updown.go dividía part.FileName() por / pero no rechazaba .., permitiendo que una carga no autenticada con el nombre de archivo .. creara un archivo fuera del árbol servido. Este problema se ha corregido en la versión 2.1.5.","source":"nvd"}],"published":"2026-07-28T22:07:15.558Z","modified":"2026-10-23T23:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 2.1.5","status":"affected"}],"vendor":"goshs-labs","product":"goshs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.5-0.20260727065949-f3ef599e4091"}],"ecosystem":"Go","package":"goshs.de/goshs/v2","purl":"pkg:golang/goshs.de/goshs/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.5-0.20260727065949-f3ef599e4091"}],"ecosystem":"Go","package":"github.com/patrickhener/goshs/v2","purl":"pkg:golang/github.com/patrickhener/goshs/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.1.4"}],"ecosystem":"Go","package":"goshs.de/goshs","purl":"pkg:golang/goshs.de/goshs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.1.4"}],"ecosystem":"Go","package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"goshs.de/goshs","purl":"pkg:golang/goshs.de/goshs","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.5-0.20260727065949-f3ef599e4091"}],"ecosystem":"Go","package":"goshs.de/goshs/v2","purl":"pkg:golang/goshs.de/goshs/v2","source":"go"}],"references":[{"url":"https://github.com/goshs-labs/goshs/security/advisories/GHSA-wg2q-39h6-66x9","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fa","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/goshs-labs/goshs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-29T14:09:21.054Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-66063","url":"https://www.cve.org/CVERecord?id=CVE-2026-66063","licence":"CVE Terms of Use","modified":"2026-07-29T14:10:09.074Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wg2q-39h6-66x9","url":"https://github.com/advisories/GHSA-wg2q-39h6-66x9","licence":"CC-BY-4.0","modified":"2026-08-18T15:10:58.026Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6137","url":"https://pkg.go.dev/vuln/GO-2026-6137","licence":"CC-BY-4.0","modified":"2026-08-18T15:00:14.475Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-66063","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66063","licence":"Public domain","modified":"2026-10-23T23:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:30.397Z","epss":{"score":0.00233,"percentile":0.15148,"date":"2026-12-01T12:00:22.000Z"}}