goshs.de/goshs/v2
Affected
- introduced
0, fixed2.1.5-0.20260727065949-f3ef599e4091(semver)
Fixed versions
2.1.5-0.20260727065949-f3ef599e4091
Fix
- Fixed version
2.1.5-0.20260727065949-f3ef599e4091go get goshs.de/goshs/[email protected]
Advisory
Also known as: CVE-2026-66063, GO-2026-6137
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 "..". 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
Tooling
AI assistance was used while investigating. The finding was reproduced against a running server on loopback.
Medium Basis: The source's own band: MODERATE
0, fixed 2.1.5-0.20260727065949-f3ef599e4091 (semver)2.1.5-0.20260727065949-f3ef599e4091
2.1.5-0.20260727065949-f3ef599e4091go get goshs.de/goshs/[email protected]0, fixed 2.1.5-0.20260727065949-f3ef599e4091 (semver)2.1.5-0.20260727065949-f3ef599e4091
2.1.5-0.20260727065949-f3ef599e4091go get github.com/patrickhener/goshs/[email protected]0, last affected 1.1.4 (semver)None listed
No fixed version is listed.
0, last affected 1.1.4 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0