CVE-2026-66064: Github.com/patrickhener/goshs/v2 Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-964w-f6gj-5236
CVSS 5.3
CWE-41 CWE-863 CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-66064
GHSA Identifier GHSA-964w-f6gj-5236
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-41: Improper Resolution of Path Equivalence
Affected Product Github.com/patrickhener/goshs/v2
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (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.

github.com/patrickhener/goshs/v2 fixed: 2.1.5-0.20260727065949-f3ef599e4091
Upgrade github.com/patrickhener/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
goshs.de/goshs/v2 fixed: 2.1.5-0.20260727065949-f3ef599e4091
Upgrade goshs.de/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
github.com/patrickhener/goshs fixed: Latest secure release
Upgrade github.com/patrickhener/goshs to Latest secure release
goshs.de/goshs fixed: Latest secure release
Upgrade goshs.de/goshs to Latest secure release
Verify Direct and Transitive Dependencies

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

## 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.

CVE-2026-66064 Affected Github.com/patrickhener/goshs/v2 Versions

4 component(s)
Fixed Versions:
2.1.5-0.20260727065949-f3ef599e4091
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?
CVE-2026-66064 is a security vulnerability in Github.com/patrickhener/goshs/v2 involving goshs has ACL Bypass & Path Traversal under CWE-41: Improper Resolution of Path Equivalence.
Which Github.com/patrickhener/goshs/v2 versions are affected?
Affected versions include releases prior to 2.1.5-0.20260727065949-f3ef599e4091 across affected packages: github.com/patrickhener/goshs/v2, goshs.de/goshs/v2, github.com/patrickhener/goshs, goshs.de/goshs.
What version fixes CVE-2026-66064?
Upgrading to 2.1.5-0.20260727065949-f3ef599e4091 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/patrickhener/goshs/v2 affected?
Yes, github.com/patrickhener/goshs/v2 is affected in releases prior to 2.1.5-0.20260727065949-f3ef599e4091. Upgrade your dependency to 2.1.5-0.20260727065949-f3ef599e4091 or later.
Is goshs.de/goshs/v2 affected?
Yes, goshs.de/goshs/v2 is affected in releases prior to 2.1.5-0.20260727065949-f3ef599e4091. Upgrade your dependency to 2.1.5-0.20260727065949-f3ef599e4091 or later.
What is the CVSS score of CVE-2026-66064?
CVE-2026-66064 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-66064?
CVE-2026-66064 is classified under CWE-41: Improper Resolution of Path Equivalence (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.).
How can I check Go dependencies for CVE-2026-66064?
Run the dependency tree command: 'inspect dependencies for github.com/patrickhener/goshs/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}