Vulnerability · Published May 4, 2026 · Assigned by GitHub_M
CVE-2026-42091goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS
Medium 6.5
In plain English
A medium-severity cross-site request forgery in goshs from patrickhener. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/patrickhener/goshs | no fix listed | GHSA-rhf7-wvw3-vjvm |
| Go | github.com/patrickhener/goshs | no fix listed | GO-2026-5625 |
| Go | github.com/patrickhener/goshs/v2 | 2.0.2 | GHSA-rhf7-wvw3-vjvm |
| Go | goshs.de/goshs | no fix listed | GO-2026-5625 |
| Go | goshs.de/goshs/v2 | 2.0.2 | GO-2026-5625 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| patrickhener | goshs | < 2.0.2 |
Weakness: CWE-352 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N