Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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