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.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.2%top 94.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Gogithub.com/patrickhener/goshsno fix listedGHSA-rhf7-wvw3-vjvm
Gogithub.com/patrickhener/goshsno fix listedGO-2026-5625
Gogithub.com/patrickhener/goshs/v22.0.2GHSA-rhf7-wvw3-vjvm
Gogoshs.de/goshsno fix listedGO-2026-5625
Gogoshs.de/goshs/v22.0.2GO-2026-5625

Affected products (as reported)

VendorProductVersions
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

References