medium6.5
CVE-2026-42091
goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS
Impact
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.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| go | github.com/patrickhener/goshs/v2 | < 2.0.2 | 2.0.2 |
| go | github.com/patrickhener/goshs | <= 1.1.4 | none recorded |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Goshs | Goshs | before 2.0.2 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-rhf7-wvw3-vjvm
- https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm
- https://nvd.nist.gov/vuln/detail/CVE-2026-42091
- https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32
- https://github.com/patrickhener/goshs/releases/tag/v2.0.2