{"id":"CVE-2026-66063","aliases":["GHSA-wg2q-39h6-66x9","GO-2026-6137"],"url":"https://o3.security/vulnerability/CVE-2026-66063","summary":"goshs has a Path Traversal issue","details":"## 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.","published":"2026-07-28T22:07:15.558Z","modified":"2026-10-28T02:30:24.145099701Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":{"score":0.00343,"percentile":0.2843,"asOf":"2026-11-22"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"goshs.de/goshs/v2","fixedVersion":"2.1.5-0.20260727065949-f3ef599e4091"},{"ecosystem":"Go","name":"github.com/patrickhener/goshs/v2","fixedVersion":"2.1.5-0.20260727065949-f3ef599e4091"},{"ecosystem":"Go","name":"goshs.de/goshs","fixedVersion":null},{"ecosystem":"Go","name":"github.com/patrickhener/goshs","fixedVersion":null}],"fix":{"url":"https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fa","label":"goshs-labs/goshs@f3ef599"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66063.json"},{"type":"ADVISORY","url":"https://github.com/goshs-labs/goshs/security/advisories/GHSA-wg2q-39h6-66x9"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66063"},{"type":"FIX","url":"https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fa"},{"type":"PACKAGE","url":"https://github.com/goshs-labs/goshs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:24.145099701Z"}}