Missing Authentication for Critical Function Affecting github.com/patrickhener/goshs/sanity package, versions <2.0.0-beta.6


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.48% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Missing Authentication for Critical Function vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMPATRICKHENERGOSHSSANITY-16316096
  • published28 Apr 2026
  • disclosed22 Apr 2026
  • creditR1ZZG0D

Introduced: 22 Apr 2026

CVE-2026-40884  (opens in a new tab)
CWE-306  (opens in a new tab)

How to fix?

Upgrade github.com/patrickhener/goshs/sanity to version 2.0.0-beta.6 or higher.

Overview

Affected versions of this package are vulnerable to Missing Authentication for Critical Function via the SFTP authentication process when the server is configured with an empty username and a password using the -b ':pass' flag together with -sftp. An attacker can gain unauthorized access to files by connecting to the SFTP service without providing a password. This is only exploitable if the server is started with both the empty-username basic-auth syntax and SFTP enabled.

CVSS Base Scores

version 4.0
version 3.1