# CVE-2026-62325: goshs SFTP authentication bypass via empty password handler logic

Source: https://junglewise.ai/threats/cve-2026-62325-goshs-sftp-authentication-bypass-via-empty-password-handler-logic  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-28. Updated: 2026-07-28  
License: CC BY 4.0 with a link back

CVE-2026-62325 · Severity: critical · CVSS 9.1 · Published 2026-07-28

goshs is a file server tool used by developers and security professionals to quickly share files over a network. A security flaw in the SFTP component allows unauthorized users to access, download, or delete files without providing a password if the server is configured with a username but no password. This could lead to the complete exposure or loss of sensitive data hosted on the server.

Technologies: [github.com/patrickhener/goshs/v2 (Go)](https://junglewise.ai/threats/technologies/github-com-patrickhener-goshs-v2), [goshs.de/goshs (Go)](https://junglewise.ai/threats/technologies/goshs-de-goshs), [goshs.de/goshs/v2 (Go)](https://junglewise.ai/threats/technologies/goshs-de-goshs-v2). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-62325 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-62325 being exploited in the wild.

**How severe is CVE-2026-62325?** Critical severity, with a CVSS score of 9.1, published 28 July 2026.

**Which products and versions are affected?** github.com/patrickhener/goshs/v2 (Go) = 2.1.3, SEMVER:introduced=2.1.3,fixed=2.1.4; goshs.de/goshs (Go) SEMVER:introduced=0; goshs.de/goshs/v2 (Go) = 2.1.3, SEMVER:introduced=2.1.3,fixed=2.1.4.

**Is there a fix for CVE-2026-62325?** Yes. github.com/patrickhener/goshs/v2 (Go): upgrade to 2.1.4 or later; goshs.de/goshs/v2 (Go): upgrade to 2.1.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-62325 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-62325?** Check whether you run github.com/patrickhener/goshs/v2 (Go), goshs.de/goshs (Go) or goshs.de/goshs/v2 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/patrickhener/goshs/v2 (Go): upgrade to 2.1.4 or later

  ```sh
  go get github.com/patrickhener/goshs/v2@v2.1.4
  ```

- goshs.de/goshs/v2 (Go): upgrade to 2.1.4 or later

  ```sh
  go get goshs.de/goshs/v2@v2.1.4
  ```


## Technical details

A vulnerability in `sftpserver/sftpserver.go` exists because the SFTP password handler is only initialized if both a username and password are non-empty (`Username != "" && Password != ""`). When a user starts goshs with a username but an empty password (e.g., `-b 'admin:' -sftp`) and no public key file (`-fkf`), the `PasswordHandler` remains nil. The underlying `gliderlabs/ssh` library defaults to `NoClientAuth = true` when all authentication handlers are nil, allowing remote attackers to connect via SFTP without any credentials. This is an incomplete fix for a previous vulnerability (CVE-2026-40884) which only addressed empty usernames. The issue is resolved in version 2.1.4 by changing the logic to use an OR (`||`) operator, ensuring the handler is installed if either credential is provided.

## Affected products

- goshs-labs goshs >= 2.1.3, < 2.1.4

## Identifiers

- CVE-2026-62325
- GHSA-rjrw-mjq6-hpmm
- GO-2026-6132

## Timeline

- 2026-06-26: disclosed: GHSA-rjrw-mjq6-hpmm published
- 2026-07-03: patched: Version 2.1.4 released
- 2026-07-28: advisory: NVD published CVE-2026-62325

## References

- [https://github.com/goshs-labs/goshs/commit/32f4a0e1790a709f722d0f3b2341f139d003180a](https://github.com/goshs-labs/goshs/commit/32f4a0e1790a709f722d0f3b2341f139d003180a)
- [https://github.com/goshs-labs/goshs/releases/tag/v2.1.4](https://github.com/goshs-labs/goshs/releases/tag/v2.1.4)
- [https://github.com/goshs-labs/goshs/security/advisories/GHSA-rjrw-mjq6-hpmm](https://github.com/goshs-labs/goshs/security/advisories/GHSA-rjrw-mjq6-hpmm)

## Related threats

- [patrickhener goshs race condition in share-link download limit](https://junglewise.ai/threats/cve-2026-50139-patrickhener-goshs-race-condition-in-share-link-download-limit)
- [patrickhener goshs access control bypass in WebDAV listener](https://junglewise.ai/threats/cve-2026-50138-patrickhener-goshs-access-control-bypass-in-webdav-listener)
- [goshs-labs goshs ACL bypass via trailing slash in sendFile handler](https://junglewise.ai/threats/cve-2026-66064-goshs-labs-goshs-acl-bypass-via-trailing-slash-in-sendfile)
- [goshs path traversal in multipart upload handler](https://junglewise.ai/threats/cve-2026-66063-goshs-path-traversal-in-multipart-upload-handler)
- [goshs WebDAV deletion bypass via MOVE and COPY methods](https://junglewise.ai/threats/cve-2026-64863-goshs-webdav-deletion-bypass-via-move-and-copy-methods)
