Loading advisory.
Loading advisory.
goshs has ACL Bypass & Path Traversal
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.
Published 2026-07-28 22:12 UTC · Modified 2026-08-18 15:10 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| github.com/patrickhener/goshs/v2 | Go | < 2.1.5-0.20260727065949-f3ef599e4091 | 2.1.5-0.20260727065949-f3ef599e4091 | go get github.com/patrickhener/goshs/v2@v2.1.5-0.20260727065949-f3ef599e4091 |
| goshs.de/goshs/v2 | Go | < 2.1.5-0.20260727065949-f3ef599e4091 | 2.1.5-0.20260727065949-f3ef599e4091 | go get goshs.de/goshs/v2@v2.1.5-0.20260727065949-f3ef599e4091 |
| github.com/patrickhener/goshs | Go | <= 1.1.4 all versions | No patch yet | No command until a fix exists. |
| goshs.de/goshs | Go | <= 1.1.4 all versions | No patch yet | No command until a fix exists. |
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.
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 hashUnauthenticated 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.
Derive the served filename from the same cleaned path used to open the file, so the authorization decision and the file access cannot disagree.
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.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.004 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |