Security Digest · Vulnerability record

CVE-2026-40189: goshs has a file-based ACL authorization bypass in goshs state-changing routes

goshs is a SimpleHTTPServer written in Go.

CVSS 9.3 Critical EPSS 0.7% · p51

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 0.7%, percentile 51: FIRST’s model estimates a 0.7% chance of exploitation activity in the next 30 days, higher than 51% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes github.com/patrickhener/goshs (Go) <= 1.1.4, no fixed version listed. Check your lockfile, including transitive dependencies.

What it is

goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.4, goshs enforces the documented per-folder .goshs ACL/basic-auth mechanism for directory listings and file reads, but it does not enforce the same authorization checks for state-changing routes. An unauthenticated attacker can upload files with PUT, upload files with multipart POST /upload, create directories with ?mkdir, and delete files with ?delete inside a .goshs-protected directory. By deleting the .goshs file itself, the attacker can remove the folder's auth policy and then access previously protected content without credentials. This results in a critical authorization bypass affecting confidentiality, integrity, and availability. This vulnerability is fixed in 2.0.0-beta.4.

From the GitHub advisory

Summary goshs enforces the documented per-folder .goshs ACL/basic-auth mechanism for directory listings and file reads, but it does not enforce the same authorization checks for state-changing routes. An unauthenticated attacker can upload files with PUT, upload files with multipart POST /upload, create directories with ?mkdir, and delete files with ?delete inside a .goshs-protected directory. By deleting the .goshs file itself, the attacker can remove the folder's auth policy and then access previously protected content without credentials. This results in a critical authorization bypass affecting confidentiality, integrity, and availability.

Details The project README explicitly documents file-based ACLs as a security feature:

- README.md:59 - "You can place a .goshs in any folder to apply custom ACLs" - README.md:61 - "You can apply custom basic auth per folder"

The read/list path correctly enforces .goshs:

- httpserver/filebased.go:10-49 loads .goshs - httpserver/handler.go:68-91 calls findSpecialFile() for directories - httpserver/handler.go:94-101 calls findSpecialFile() for files - httpserver/handler.go:285-305 applies custom auth - httpserver/handler.go:545-565 enforces folder auth during directory rendering - httpserver/handler.go:590-630 enforces file auth and blocked entries during file serving

Weakness type: CWE-862.

Product: github.com/patrickhener/goshs (Go) · Assigned by: GitHub_M · Published: 2026-04-10

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Gogithub.com/patrickhener/goshs<= 1.1.4none listed
VendorProductAffected versions (per CVE record)
patrickhenergoshs< 2.0.0-beta.4

Severity scores

Scored byCVSSScoreVector
GitHub_M4.09.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub4.09.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.66% probability of exploitation activity in the next 30 days; percentile 51.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-wvhv-qcqf-f3cx published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-wvhv-qcqf-f3cx github.com
  2. CVE.org record CVE-2026-40189 cve.org
  3. NVD entry CVE-2026-40189 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com

Critical Go advisories · Today’s Security Digest