CVE-2026-66064: Github.com/patrickhener/goshs/v2 Path Traversal Vulnerability
MODERATECVE-2026-66064 is a MODERATE (CVSS 5.3) path traversal vulnerability (CWE-41: Improper Resolution of Path Equivalence) affecting Github.com/patrickhener/goshs/v2 libraries in the Go ecosystem. The issue involves goshs has acl bypass & path traversal. Remediation is available by upgrading affected packages to version 2.1.5-0.20260727065949-f3ef599e4091.
CVE-2026-66064 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-66064
To remediate this vulnerability, upgrade all affected Github.com/patrickhener/goshs/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/patrickhener/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
Upgrade goshs.de/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
Upgrade github.com/patrickhener/goshs to Latest secure release
Upgrade goshs.de/goshs to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/patrickhener/goshs/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-66064, inspect your project dependencies for Github.com/patrickhener/goshs/v2:
inspect dependencies for github.com/patrickhener/goshs/v2
Analyze the terminal output to locate any version of Github.com/patrickhener/goshs/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.5-0.20260727065949-f3ef599e4091), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-41: Improper Resolution of Path Equivalence, where the product is vulnerable to file system contents disclosure through path equivalence. path equivalence involves the use of special characters in file and directory names. the associated manipulations are intended to generate multiple names for the same object. In Github.com/patrickhener/goshs/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-66064 Affected Github.com/patrickhener/goshs/v2 Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/patrickhener/goshs/v2
|
Go |
< 2.1.5-0.20260727065949-f3ef599e4091
|
2.1.5-0.20260727065949-f3ef599e4091
|
|
goshs.de/goshs/v2
|
Go |
< 2.1.5-0.20260727065949-f3ef599e4091
|
2.1.5-0.20260727065949-f3ef599e4091
|
|
github.com/patrickhener/goshs
|
Go |
≤ 1.1.4
|
|
|
goshs.de/goshs
|
Go |
≤ 1.1.4
|
|
References
Frequently Asked Questions
What is CVE-2026-66064?
Which Github.com/patrickhener/goshs/v2 versions are affected?
What version fixes CVE-2026-66064?
Is github.com/patrickhener/goshs/v2 affected?
Is goshs.de/goshs/v2 affected?
What is the CVSS score of CVE-2026-66064?
What CWE is associated with CVE-2026-66064?
How can I check Go dependencies for CVE-2026-66064?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-964w-f6gj-5236",
"modified" : "2026-07-28T22:26:28Z",
"published" : "2026-07-28T22:26:28Z",
"aliases" : [ "CVE-2026-66064" ],
"summary" : "goshs has ACL Bypass & Path Traversal",
"details" : "## Summary\n\n`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. \n\n## Finding (Medium): trailing-slash ACL and hidden-file bypass\n\nhttpserver/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.\n\nMeasured, with negative controls:\n\n```\nGET /blocked/secret.txt -> 404 (control, correctly blocked)\nGET /blocked/secret.txt/ -> 200 + contents\nGET /blocked/.goshs/ -> 200, returns the ACL file itself,\n including the admin:$2a$... bcrypt hash\n```\n\nUnauthenticated 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.\n\n## Suggested fixes\n\n1. Derive the served filename from the same cleaned path used to open the file, so the authorization decision and the file access cannot disagree.\n\n## Tooling\n\nAI 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/patrickhener/goshs/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.5-0.20260727065949-f3ef599e4091"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.1.4"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "goshs.de/goshs/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.5-0.20260727065949-f3ef599e4091"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.1.4"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/patrickhener/goshs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "goshs.de/goshs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goshs-labs/goshs/security/advisories/GHSA-964w-f6gj-5236"
}, {
"type" : "WEB",
"url" : "https://github.com/goshs-labs/goshs/pull/222"
}, {
"type" : "WEB",
"url" : "https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fa"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goshs-labs/goshs"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-41", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-28T22:26:28Z",
"nvd_published_at" : null
}
}