Skip to content
OpenAdvisories
Critical · 9.8 CVE-2026-40884 EUVD-2026-24272GHSA-c29w-qq4m-2gcvGO-2026-5303

goshs: Empty-username SFTP password authentication bypass in goshs

Published Apr 21, 2026 · Updated Apr 22, 2026 · Assigned by GitHub_M

Description

goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.6, goshs contains an SFTP authentication bypass when the documented empty-username basic-auth syntax is used. If the server is started with -b ':pass' together with -sftp, goshs accepts that configuration but does not install any SFTP password handler. As a result, an unauthenticated network attacker can connect to the SFTP service and access files without a password. This vulnerability is fixed in 2.0.0-beta.6.

Affected products

VendorProductAffectedFixed
patrickhener goshs < 2.0.0-beta.6 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260723T184607-160000.1.1 openSUSE-SU-2026:21483-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/patrickhener/goshs <= 1.1.4 — GHSA-c29w-qq4m-2gcv
Go github.com/patrickhener/goshs all versions — GO-2026-5303
Go github.com/patrickhener/goshs/v2 < 2.0.0 2.0.0 GHSA-c29w-qq4m-2gcv

Advisories 1

References