🛡️ CVE-2026-66064 — goshs

🟡 CVSS 5.3 — Medium ✅ No Known Exploit CWE-22 NVD
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

goshs has ACL Bypass & Path Traversal

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.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity none, availability none.

Weakness class

CVE-2026-66064 is classified as CWE-22: Path Traversal. A file path built from user input is not confined to the intended directory, letting an attacker reach files elsewhere on the filesystem.

Affected software

CVE-2026-66064 is recorded against 5 packages.

  • github.com/patrickhener/goshs
  • github.com/patrickhener/goshs/v2
  • goshs.de/goshs
  • goshs.de/goshs/v2
  • unknown

Timeline and source

Published on 28 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)

Details

Severity Medium
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE CWE-22
Public Exploit ✅ No
Source NVD
Published 2026-07-28
Updated 2026-08-12
Modified 2026-07-28
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/patrickhener/goshs
github.com/patrickhener/goshs/v2
goshs.de/goshs
goshs.de/goshs/v2
unknown

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in goshs

CVE-2026-66064 is rated CVSS 5.3 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026