CVE-2026-66064
mediumpriority · track · 0OT risk · elevatedEPSS 0.004 · 39 %ileEUUSEPSS · scored 2026-10-28
goshs is a feature-rich single-binary file server for red teamers and developers. Prior to 2.1.5, the httpserver/handler.go sendFile handler opened files using a cleaned path but derived the authorization filename from raw req.URL.Path, so a trailing slash could bypass .goshs ACL-file protection and block-list checks. This issue is fixed in version 2.1.5.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (7)
Products and version ranges known to be affected.
- Go github.com/patrickhener/goshs/v2< 2.1.5-0.20260727065949-f3ef599e4091osvUSpkg:golang/github.com/patrickhener/goshs/v2
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-964w-f6gj-5236goshs has ACL Bypass & Path Traversal2026-07-28ghsa · osvUS
## Summary `sendFile` derives the served filename from the raw request path while opening the file from the cleaned path, so appending a trailing slash empties the derived name and defeats both the never-serve rule for the ACL file and the block list. ## Finding (Medium): trailing-slash ACL and hidden-file bypass httpserver/handler.go, sendFile (lines 789-801) takes the filename from the RAW req.URL.Path while the file itself is opened from the filepath.Clean-ed path. The two disagree, and a trailing slash makes the derived name the empty string. Both protections key on that derived name, so both are defeated: the rule that never serves the .goshs ACL file, and the acl.Block list. Measured, with negative controls: ``` GET /blocked/secret.txt -> 404 (control, correctly blocked) GET /blocked/secret.txt/ -> 200 + contents GET /blocked/.goshs/ -> 200, returns the ACL file itself, including the admin:$2a$... bcrypt hash ``` Unauthenticated when the ACL is configured block-only (common usage). Stated precisely: AUTHENTICATION IS NOT BYPASSED. An unauthenticated request against a directory protected by authentication still returns 401 under the same trick; I tested that. The claim is specifically that the block list and the ACL-file protection are bypassed. In-tree evidence that sendFile is the defect: the sibling handlers doDir and bulkDownload both derive the name correctly; sendFile is the lone outlier. ## Suggested fixes 1. Derive the served filename from the same cleaned path used to open the file, so the authorization decision and the file access cannot disagree. ## Tooling AI assistance was used while investigating. The finding was reproduced against a running server on loopback with negative controls, including the 404-versus-200 pair and the authenticated-directory control that shows authentication is not affected.
- GO-2026-6134goshs has ACL Bypass & Path Traversal in github.com/patrickhener/goshs2026-08-18vendor · osvUS
goshs has ACL Bypass & Path Traversal in github.com/patrickhener/goshs
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54facnnvd
- https://github.com/goshs-labs/goshs/pull/222cnnvd
- https://github.com/goshs-labs/goshs/releasesPatchcnnvd
- https://github.com/goshs-labs/goshs/security/advisories/GHSA-964w-f6gj-5236cnnvd
- https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54faenisa_euvd
- https://github.com/goshs-labs/goshs/pull/222enisa_euvd
- https://github.com/goshs-labs/goshs/security/advisories/GHSA-964w-f6gj-5236enisa_euvd
- https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fanvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan