CVE-2026-40884
CRITICAL 9.8CVSS 3.1goshs has an empty-username SFTP password authentication bypass
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.
- Published
- 21 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-306
- Also known as
- GHSA-c29w-qq4m-2gcvGO-2026-5303
- Sources
- NVDJSONOSV GHSA-c29w-qq4m-2gcvJSONOSV GO-2026-5303JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:* |
< 2.0.0 | 2.0.0 |
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:2.0.0:beta1:*:*:*:go:*:* |
= 2.0.0 | |
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:2.0.0:beta2:*:*:*:go:*:* |
= 2.0.0 | |
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:2.0.0:beta3:*:*:*:go:*:* |
= 2.0.0 | |
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:2.0.0:beta4:*:*:*:go:*:* |
= 2.0.0 | |
| NVD | goshs | goshscpe:2.3:a:goshs:goshs:2.0.0:beta5:*:*:*:go:*:* |
= 2.0.0 | |
| OSV | Go | github.com/patrickhener/goshs | <= 1.1.4 | |
| OSV | Go | github.com/patrickhener/goshs/v2 | < 2.0.0 | 2.0.0 |
| OSV | Go | github.com/patrickhener/goshs | all versions |
References
- https://github.com/patrickhener/goshs/security/advisories/GHSA-c29w-qq4m-2gcv · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-40884 · ADVISORY
- https://github.com/patrickhener/goshs · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 21 Apr 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 25 Jun 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 14 Apr 2026)