{"id":"CVE-2026-42091","published":"2026-05-04T17:24:47Z","modified":"2026-05-05T14:14:46Z","title":"goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS","vendor":"patrickhener","product":"goshs","tier":"tail","description":{"text":"goshs is a SimpleHTTPServer written in Go. Prior to version 2.0.2, the PUT upload handler (httpserver/updown.go) lacks the CSRF token validation that was added to the POST upload handler during the CVE-2026-40883 fix. Combined with the unconditional Access-Control-Allow-Origin: * on the OPTIONS preflight handler (httpserver/server.go), any website can write arbitrary files to a goshs instance through the victim's browser — bypassing network isolation (e.g. localhost, internal network). This issue has been patched in version 2.0.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00226,"percentile":0.07882,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32","tags":["x_refsource_MISC"]},{"url":"https://github.com/patrickhener/goshs/releases/tag/v2.0.2","tags":["x_refsource_MISC"]}],"priority":{"score":6.1,"factors":[{"name":"EPSS percentile","points":1.58},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"patrickhener","affectedVersions":[{"vendor":"patrickhener","product":"goshs","versions":["< 2.0.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-05T13:07:28.351435Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/patrickhener/goshs/v2","vulnerableRanges":["<2.0.2"],"patched":["2.0.2"],"from":["GHSA-rhf7-wvw3-vjvm"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/patrickhener/goshs","vulnerableRanges":["<=1.1.4","all versions"],"patched":[],"from":["GHSA-rhf7-wvw3-vjvm","GO-2026-5625"],"provenance":"source"},{"ecosystem":"Go","package":"goshs.de/goshs","vulnerableRanges":["all versions"],"patched":[],"from":["GO-2026-5625"],"provenance":"source"},{"ecosystem":"Go","package":"goshs.de/goshs/v2","vulnerableRanges":["<2.0.2"],"patched":["2.0.2"],"from":["GO-2026-5625"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-27067","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-patrickhener-goshs-cve-2026-35471","parents":[{"from":"CVE-2026-35471","to":"CVE-2026-42091","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["httpserver/handler.go","httpserver/updown.go"],"commits":["https://github.com/patrickhener/goshs/commit/237f3af891a90df9b903b85f1cd3438040ca261a","https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32"],"basis":"rarely changed file"}]},{"from":"CVE-2026-40189","to":"CVE-2026-42091","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["httpserver/handler.go","httpserver/updown.go"],"commits":["https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f","https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-40885","published":"2026-04-21","fixed":"2.0.0-beta.6","kev":false},{"cve":"CVE-2026-40876","published":"2026-04-21","fixed":"2.0.0","kev":false,"link":{"from":"CVE-2026-40876","to":"CVE-2026-42091","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/patrickhener/goshs/v2","fromFixed":"2.0.0","toFixed":"2.0.2","daysApart":13}]}},{"cve":"CVE-2026-40884","published":"2026-04-21","fixed":"2.0.0","kev":false},{"cve":"CVE-2026-42091","published":"2026-05-04","fixed":"2.0.2","kev":false},{"cve":"CVE-2026-54719","published":"2026-07-28","fixed":"2.1.1","kev":false,"link":{"from":"CVE-2026-42091","to":"CVE-2026-54719","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/patrickhener/goshs/v2","fromFixed":"2.0.2","toFixed":"2.1.1","daysApart":85}]}},{"cve":"CVE-2026-62325","published":"2026-07-28","fixed":"2.1.4","kev":false},{"cve":"CVE-2026-64863","published":"2026-07-28","fixed":"2.1.4","kev":false}],"package":"Go:github.com/patrickhener/goshs/v2"}}