# CVE-2026-40884: goshs: Empty-username SFTP password authentication bypass in goshs

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-14T22:28:30.000Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-c29w-qq4m-2gcv, GO-2026-5303
- Weaknesses: CWE-306
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- patrickhener goshs: < 2.0.0-beta.6
- github.com/patrickhener/goshs (Go): up to 1.1.4; all versions
- github.com/patrickhener/goshs/v2 (Go): before 2.0.0
- goshs goshs: before 2.0.0; 2.0.0

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/patrickhener/goshs/security/advisories/GHSA-c29w-qq4m-2gcv> (exploit, advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40884> (advisory)
- <https://github.com/patrickhener/goshs> (package)

## Sources

- CVE List: [CVE-2026-40884](https://www.cve.org/CVERecord?id=CVE-2026-40884), CVE Terms of Use, modified 2026-04-22
- GitHub Advisory Database: [GHSA-c29w-qq4m-2gcv](https://github.com/advisories/GHSA-c29w-qq4m-2gcv), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5303](https://pkg.go.dev/vuln/GO-2026-5303), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40884](https://nvd.nist.gov/vuln/detail/CVE-2026-40884), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40884 · Whole record: https://cve.day/CVE-2026-40884.json · Rebuilt by cve.day 2026-11-25T22:59:19.140Z
