CVE-2026-42091
MEDIUM 6.5CVSS 3.1goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS
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.
- Published
- 4 May 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-352
- Also known as
- GHSA-rhf7-wvw3-vjvmGO-2026-5625
- Sources
- NVDJSONOSV GHSA-rhf7-wvw3-vjvmJSONOSV GO-2026-5625JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:* |
< 2.0.2 | 2.0.2 |
| OSV | Go | github.com/patrickhener/goshs/v2 | < 2.0.2 | 2.0.2 |
| OSV | Go | github.com/patrickhener/goshs | <= 1.1.4 | |
| OSV | Go | github.com/patrickhener/goshs | all versions | |
| OSV | Go | goshs.de/goshs | all versions | |
| OSV | Go | goshs.de/goshs/v2 | < 2.0.2 | 2.0.2 |
References
- https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32 · Patch, WEB, FIX
- https://github.com/patrickhener/goshs/releases/tag/v2.0.2 · Product, Release Notes, WEB
- https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-42091 · ADVISORY
- https://github.com/patrickhener/goshs · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 4 May 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 25 Jun 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 23 Apr 2026)