CVE-2026-42091 goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS
MediumCVSS 6.5
EPSS 0.17%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
Description
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.
Upgrade path
4 packages: 1 fixed, 2 partially fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| goshs.de/goshs/v2(Go) | < 2.0.2; All versions | 2.0.2 | Partially fixed |
| patrickhener goshs(Go) | < 2.0.2; <= 1.1.4; All versions | 2.0.2 | Partially fixed |
| goshs | < 2.0.2 | 2.0.2 | Fixed |
| patrickhener goshs | = < 2.0.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| patrickhener goshs | = < 2.0.2 | No fix listed |
| patrickhener goshs(Go) | < 2.0.2 | 2.0.2 |
| patrickhener goshs(Go) | <= 1.1.4 | No fix listed |
| patrickhener goshs(Go) | All versions | No fix listed |
| goshs.de/goshs/v2(Go) | All versions | No fix listed |
| goshs.de/goshs/v2(Go) | < 2.0.2 | 2.0.2 |
| goshs | < 2.0.2 | 2.0.2 |
References
- https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm exploit vendor-advisory
- https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32 patch
- https://github.com/patrickhener/goshs/releases/tag/v2.0.2 product release-notes
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com product
- github.com