Skip to content

← Actionable
Medium, CVSS 6.5

goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS

CVE-2026-42091GHSA-rhf7-wvw3-vjvm

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Go github.com/patrickhener/goshs/v2

    Affected
    < 2.0.2
    Fixed in
    2.0.2
  • Go github.com/patrickhener/goshs

    Affected
    <= 1.1.4
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
EPSS
  • CVE-2026-42091: 0.17% estimated exploitation activity in the next 30 days; percentile 5.74 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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. Root Cause 2 — Wildcard CORS (httpserver/server.go:126) The OPTIONS handler unconditionally returns permissive CORS headers: This allows any website's JavaScript to pass the browser's CORS preflight check and send PUT requests to the goshs server.…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-rhf7-wvw3-vjvm

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-42091

Advisory: goshs has Cross-Origin Arbitrary File Write via Missing CSRF on PUT and Wildcard CORS
IDs: CVE-2026-42091, GHSA-rhf7-wvw3-vjvm
Record: https://patchnext.com/advisories/cve-2026-42091 (revision 1, source checked 26 Oct 2026, 15:19 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: github.com/patrickhener/goshs/v2 2.0.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/patrickhener/goshs/v2: affected < 2.0.2; fixed in 2.0.2
- Go github.com/patrickhener/goshs: affected <= 1.1.4

## Suggested inspection (read-only)
- Go github.com/patrickhener/goshs/v2: check the installed version with your package manager.
- Go github.com/patrickhener/goshs: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/patrickhener/goshs/v2, github.com/patrickhener/goshs.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-rhf7-wvw3-vjvm (GitHub-reviewed advisory GHSA-rhf7-wvw3-vjvm lists affected ranges: Go github.com/patrickhener/goshs/v2 >=0 =0 <=1.1.4)

Commands are suggestions: review each one before running it.

Loading voting…