Skip to content
Heist/ feed
Back to feed
Critical

goshs: Empty-username SFTP password authentication bypass in goshs

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40884
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:46 UTC · Revision 1

Source evidence

goshs: Empty-username SFTP password authentication bypass in goshs

core-osv · Original source

Published 21 Apr 2026, 19:39 UTC

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.

osv:CVE-2026-40884
Complete source record
{
  "id": "ce7faae4ac6f5f116e5c0d01112896b1e81700a8b278aea80d87163efcc58906",
  "url": "https://osv.dev/vulnerability/CVE-2026-40884",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "goshs: Empty-username SFTP password authentication bypass in goshs",
    "summary": "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.",
    "evidence": "osv:CVE-2026-40884",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-40884",
      "aliases": [
        "CVE-2026-40884",
        "GHSA-c29w-qq4m-2gcv",
        "GO-2026-5303"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/goshs-labs/goshs",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2f6b5d601d494601fa43fad9a712ee6117b7dbcd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.0-beta.6"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.0.0-beta.5",
            "v2.0.0-beta.4",
            "v1.1.4",
            "v2.0.0-beta.3",
            "v2.0.0-beta.2",
            "v2.0.0-beta.1",
            "1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.9",
            "v1.0.8",
            "v1.0.7",
            "v1.0.6",
            "v1.0.5",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.9",
            "v0.3.8",
            "v0.3.7",
            "v0.3.6",
            "v0.3.5",
            "v0.3.4",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.0",
            "v0.1.9",
            "v0.1.8",
            "v0.1.7",
            "v0.1.6",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "v0.0.9",
            "v0.0.8",
            "v0.0.6",
            "v0.0.5",
            "v0.0.4",
            "v0.0.3",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40884.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.147062283Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40884.json",
        "https://github.com/patrickhener/goshs/security/advisories/GHSA-c29w-qq4m-2gcv",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40884"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-306"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40884.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40884",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 517478,
  "published_at": "2026-04-21T19:39:25.698+00:00"
}