GHSA-rmxw-pq4x-3fvh

Suggest an improvement
Source
https://github.com/advisories/GHSA-rmxw-pq4x-3fvh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-rmxw-pq4x-3fvh/GHSA-rmxw-pq4x-3fvh.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rmxw-pq4x-3fvh
Aliases
Published
2026-07-28T21:59:48Z
Modified
2026-08-24T00:37:04Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
goshs: File-based .goshs ACL authorization bypass via the ?bulk zip-download route (unauthenticated read; residual of GHSA-wvhv-qcqf-f3cx)
Details

GHSA-wvhv-qcqf-f3cx fixed the per-folder .goshs ACL bypass on the state-changing routes (PUT/POST upload/?mkdir/?delete) and added recursive ACL resolution, and its description states the read/list path correctly enforces .goshs. That premise does not hold for the ?bulk zip-download route. bulkDownload (httpserver/updown.go) takes one or more ?file= parameters, runs each through sanitizePath(fs.Webroot, file), and streams the contents back as a ZIP without ever calling findEffectiveACL/applyCustomAuth. It is dispatched from earlyBreakParameters (?bulk) before the normal doDir/doFile/sendFile flow that performs the ACL check. An unauthenticated attacker can therefore read any file under the webroot protected solely by a .goshs ACL, bypassing both the folder auth (401 on the normal path) and the per-file block list (404 on the normal path). Same authorization-inconsistency root cause as the original advisory, surviving on a read route the fix did not cover.

Proof of concept (live, against the fixed v2.1.0 build which includes fix commit f212c4f4, served with no global -b auth, only a per-folder .goshs): GET /protected/secret.txt -> 401 (ACL enforced on normal path) GET /protected/secret.txt -u admin:admin -> 200 GET /?bulk&file=/protected/secret.txt -> 200, zip contains the protected file contents (BYPASS) GET /?bulk&file=/protected/blocked.txt -> 200, zip contains the block-listed file (block bypass) GET /protected/secret.txt?share -> 403 'Sharing disabled when auth is disabled' (correctly gated, NOT a bypass)

Impact: any unauthenticated network attacker can read files an operator protected with the documented per-folder .goshs ACL/basic-auth feature, by requesting them through ?bulk. Confidentiality only (the write/delete equivalents were closed by GHSA-wvhv-qcqf-f3cx). Applies to deployments relying on .goshs as the access boundary (a server-wide -b basic auth, if configured, also gates ?bulk via its middleware).

Remediation: enforce the effective .goshs ACL inside bulkDownload for every requested file exactly as sendFile/processDir do (resolve findEffectiveACL(filepath.Dir(absPath)) + applyCustomAuth + honor acl.Block), or route ?bulk through the same authorization gate as the normal read path. Audit ?cbDown and other alternate read routes for the same gap.

Credit: anir0y (independent security research).

Database specific
{
    "cwe_ids": [
        "CWE-862",
        "CWE-863"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-28T21:59:48Z",
    "nvd_published_at": null,
    "severity": "HIGH"
}
References

Affected packages

Go / github.com/patrickhener/goshs

Package

Name
github.com/patrickhener/goshs
View open source insights on deps.dev
Purl
pkg:golang/github.com/patrickhener/goshs

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Last Affected
1.1.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-rmxw-pq4x-3fvh/GHSA-rmxw-pq4x-3fvh.json"

Go / github.com/patrickhener/goshs/v2

Package

Name
github.com/patrickhener/goshs/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/patrickhener/goshs/v2

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.1.1

Database specific

last_known_affected_version_range
"<= 2.1.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-rmxw-pq4x-3fvh/GHSA-rmxw-pq4x-3fvh.json"

Go / goshs.de/goshs

Package

Name
goshs.de/goshs
View open source insights on deps.dev
Purl
pkg:golang/goshs.de/goshs

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Last Affected
1.1.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-rmxw-pq4x-3fvh/GHSA-rmxw-pq4x-3fvh.json"

Go / goshs.de/goshs/v2

Package

Name
goshs.de/goshs/v2
View open source insights on deps.dev
Purl
pkg:golang/goshs.de/goshs/v2

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.1.1

Database specific

last_known_affected_version_range
"<= 2.1.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-rmxw-pq4x-3fvh/GHSA-rmxw-pq4x-3fvh.json"