CVE-2026-42091

mediumpriority · track · 0EPSS 0.002 · 6 %ileEUUS
grimoire priorityP3 · Track
Exploitable?
—
no known exploitation
Likely / severe?
0.17% (6th) EPSS
CVSS 6.5 · medium
Is it mine?
7 products
Check your exposure
Who says so?
4 sources
cnnvd · enisa_euvd · osv · nvd

EPSS · scored 2026-10-28

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.

01

cvss

Technical severity, 0–10. One row per scoring source.

6.5
010

base score 0–10 · higher = more severe · hover a vector to decode

v3.16.5mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:Nsecondary · ENISA EU
v3.16.5mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:Nsecondary · security-advisories@github.comexploitability 2.8 · impact 3.6
v3.16.5mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:Nsecondary · OSV
v3.16mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N/E:Usecondary · CVSS-BT (t0sche)
02

ssvc

A stakeholder decision — act, attend, or track — from exploitation and impact.

Exploitation: poc · Automatable: no · Technical Impact: partialcoordinatorcisa_ssvcUS
03

weaknesses

The CWE weakness classes this flaw belongs to.

04

affected products (7)

Products and version ranges known to be affected.

05

advisories (2)

Vendor and ecosystem advisories describing this.

  • GHSA-rhf7-wvw3-vjvmgoshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS2026-04-23ghsa · osvUS

    ### Summary The PUT upload handler (`httpserver/updown.go`) lacks the CSRF token validation that was added to the POST upload handler during the GHSA-jrq5-hg6x-j6g3 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). ### Details **Root Cause 1 — Missing CSRF on PUT** (`httpserver/updown.go:19`) When GHSA-jrq5-hg6x-j6g3 was fixed (commit `e3c3d37`), `checkCSRF()` was added to the POST `upload()` function (line 78) but not to the PUT `put()` function directly above it in the same file. This means PUT requests are accepted without any CSRF token. ```go // POST — protected func (fs *FileServer) upload(w http.ResponseWriter, req *http.Request) { if !fs.checkCSRF(w, req) { return } // ... } // PUT — unprotected func (fs *FileServer) put(w http.ResponseWriter, req *http.Request) { // No checkCSRF call // ... } ``` **Root Cause 2 — Wildcard CORS** (`httpserver/server.go:126`) The OPTIONS handler unconditionally returns permissive CORS headers: ```go w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "POST, PUT, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") ``` This allows any website's JavaScript to pass the browser's CORS preflight check and send PUT requests to the goshs server. ### PoC [poc.zip](https://github.com/user-attachments/files/26828829/poc.zip) Please extract the uploaded compressed file before proceeding 1. bash poc.sh <img width="543" height="376" alt="스크린샷 2026-04-17 오후 11 08 13" src="https://github.com/user-attachments/assets/a695cbc8-133e-4e80-a2f5-9fe9fd36b569" /> ### Impact - Arbitrary file write to the goshs webroot from any website the victim visits - File overwrite — existing files can be silently replaced

  • GO-2026-5625goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS in github.com/patrickhener/goshs2026-06-25vendor · osvUS

    goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS in github.com/patrickhener/goshs

06

also known as (4)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2026-05-04modified 2026-10-26
08

references (9)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan