{"cve":"CVE-2026-40189","nvd":{"published":"2026-04-10T20:16:23.890","modified":"2026-10-26T22:10:00.163","status":"Analyzed","description":"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.","cvss_v4":{"vector":"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","score":9.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-862"],"references":["https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f","https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4","https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx","https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx"],"products":["goshs:goshs"],"source":"nvd","synced_at":"2026-10-26T22:26:44.656832877+00:00"},"epss":{"cve":"CVE-2026-40189","score":0.00643,"percentile":0.50539,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-wvhv-qcqf-f3cx","url":"https://osv.dev/vulnerability/GHSA-wvhv-qcqf-f3cx","summary":"goshs has a file-based ACL authorization bypass in goshs state-changing routes","modified":"2026-06-25T23:11:44.836336142Z","packages":[{"ecosystem":"Go","name":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","ranges":["<=1.1.4"],"fixed":[]}]},{"id":"GO-2026-5728","url":"https://osv.dev/vulnerability/GO-2026-5728","summary":"goshs has a file-based ACL authorization bypass in goshs state-changing routes in github.com/patrickhener/goshs","modified":"2026-06-25T23:01:40.085193732Z","packages":[{"ecosystem":"Go","name":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","ranges":["all versions"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}