Skip to content

← Actionable
Medium, CVSS 6.1

goshs has CSRF in state-changing GET routes enables authenticated file deletion and directory creation

CVE-2026-40883GHSA-jrq5-hg6x-j6g3

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/patrickhener/goshs/v2 2.0.0-beta.6), redeploy, then verify what is actually installed.

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

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.1 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2026-40883: 0.14% estimated exploitation activity in the next 30 days; percentile 3.64 (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 goshs contains a cross-site request forgery issue in its state-changing HTTP GET routes. An external attacker can cause an already authenticated browser to trigger destructive actions such as ?delete and ?mkdir because goshs relies on HTTP basic auth alone and performs no CSRF, Origin, or Referer validation for those routes. I reproduced this on v2.0.0-beta.5. Details The vulnerable request handling is reachable through normal GET requests: - httpserver/handler.go:118-123 dispatches ?mkdir directly to handleMkdir() - httpserver/handler.go:180-186 dispatches ?delete directly to deleteFile() Authentication is enforced only by HTTP basic auth: - httpserver/middleware.go:20-87 accepts any request that presents valid cached or replayed basic-auth credentials The resulting state changes hit filesystem mutation sinks: - httpserver/handler.go:683-718 calls os.RemoveAll() in deleteFile() - httpserver/handler.go:961-1000 calls os.MkdirAll() in handleMkdir() Because browsers can replay…

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

    Published from ghsa record GHSA-jrq5-hg6x-j6g3

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-40883

Advisory: goshs has CSRF in state-changing GET routes enables authenticated file deletion and directory creation
IDs: CVE-2026-40883, GHSA-jrq5-hg6x-j6g3
Record: https://patchnext.com/advisories/cve-2026-40883 (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.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: github.com/patrickhener/goshs/v2 2.0.0-beta.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/patrickhener/goshs/v2: affected >= 2.0.0-beta.4, <= 2.0.0-beta.5; fixed in 2.0.0-beta.6

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

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/patrickhener/goshs/v2.
- 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-jrq5-hg6x-j6g3 (GitHub-reviewed advisory GHSA-jrq5-hg6x-j6g3 lists affected ranges: Go github.com/patrickhener/goshs/v2 >=2.0.0-beta.4 <=2.0.0-beta.5)

Commands are suggestions: review each one before running it.

Loading voting…