CVE-2026-66063: goshs has a Path Traversal issue
Summary The multipart upload filename fix splits on the path separator but never rejects dot-dot, allowing a write outside the served tree. Finding (Medium): upload filename escapes the served tree (residual of CVE-2026-35393) The multipart filename fix (updown.go lines 135-136) splits on the path separator but never rejects "..".
Published Jul 28, 2026
Affected packages
goshs.de/goshs/v2
- Ecosystem
- Go
- Affected
- <= 2.1.4
- Fixed in
- 2.1.5-0.20260727065949-f3ef599e4091
- Check
go list -m goshs.de/goshs/v2
github.com/patrickhener/goshs/v2
- Ecosystem
- Go
- Affected
- <= 2.1.4
- Fixed in
- 2.1.5-0.20260727065949-f3ef599e4091
- Check
go list -m github.com/patrickhener/goshs/v2
goshs.de/goshs
- Ecosystem
- Go
- Affected
- <= 1.1.4
- Fixed in
- No patched version yet
- Check
go list -m goshs.de/goshs
github.com/patrickhener/goshs
- Ecosystem
- Go
- Affected
- <= 1.1.4
- Fixed in
- No patched version yet
- Check
go list -m github.com/patrickhener/goshs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The multipart upload filename fix splits on the path separator but never rejects dot-dot, allowing a write outside the served tree.
Finding (Medium): upload filename escapes the served tree (residual of CVE-2026-35393)
The 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).
Suggested fixes
- 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.
Tooling
AI assistance was used while investigating. The finding was reproduced against a running server on loopback.
Credited to arpitjain099.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-54719
goshs: File-based .goshs ACL authorization bypass via the ?bulk zip-download route (unauthenticated read; residual of GHSA-wvhv-qcqf-f3cx)
high7.5No fixJul 28, 2026CVE-2026-62325
goshs SFTP authentication bypass via empty password (incomplete fix of CVE-2026-40884)
critical9.1Jul 28, 2026CVE-2026-64863
goshs --no-delete WebDAV MOVE bypass allows file deletion/overwrite
critical9.1No fixJul 28, 2026CVE-2026-66064
goshs has ACL Bypass & Path Traversal
medium5.3No fixJul 28, 2026CVE-2026-50138
goshs: WebDAV listener ignores --read-only, --upload-only, and --no-delete mode flags
high8.1Jul 1, 2026CVE-2026-50139
goshs: Share-link ?token=… redemption races past download limit
medium5.9Jul 1, 2026
