Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40884

CVE-2026-40884: goshs SFTP Authentication Bypass Flaw

CVE-2026-40884 is an authentication bypass vulnerability in goshs SimpleHTTPServer that allows unauthenticated attackers to access SFTP files without credentials. This article covers technical details, affected versions, and fixes.

Published: April 23, 2026

CVE-2026-40884 Overview

CVE-2026-40884 is an authentication bypass vulnerability in goshs, a SimpleHTTPServer written in Go. Prior to version 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.

Critical Impact

This vulnerability allows unauthenticated remote attackers to bypass SFTP authentication entirely, potentially gaining unauthorized access to sensitive files and data on the server without providing any credentials.

Affected Products

  • goshs versions prior to 2.0.0-beta.6
  • goshs installations using empty-username basic-auth syntax (-b ':pass') with SFTP enabled (-sftp)

Discovery Timeline

  • 2026-04-21 - CVE CVE-2026-40884 published to NVD
  • 2026-04-22 - Last updated in NVD database

Technical Details for CVE-2026-40884

Vulnerability Analysis

This vulnerability is classified as CWE-306: Missing Authentication for Critical Function. The root cause lies in a configuration handling flaw where goshs fails to properly initialize an SFTP password handler when using the empty-username basic authentication syntax. When an administrator starts the server with the -b ':pass' flag combined with the -sftp flag, the application accepts this configuration without error but critically fails to enforce any authentication on the SFTP service.

The vulnerability enables network-based attacks without requiring any user interaction or prior authentication. An attacker can achieve complete compromise of confidentiality, integrity, and availability of files accessible through the SFTP service. This is particularly concerning as SFTP is commonly used to transfer sensitive data and may provide access to critical system files depending on the server's configuration.

Root Cause

The vulnerability stems from improper handling of the empty-username basic authentication configuration. When goshs parses the -b ':pass' argument (where the username portion before the colon is empty), it fails to install any SFTP password handler. This creates a condition where the SFTP service runs without authentication enforcement, allowing any network client to connect and access files without providing credentials.

The configuration parsing logic does not validate that a proper authentication handler is installed for all enabled services, leading to this authentication bypass condition.

Attack Vector

The attack is network-based and can be executed remotely without any prior authentication or user interaction. An attacker simply needs network access to the SFTP port on a vulnerable goshs instance configured with the empty-username basic-auth syntax.

The exploitation process involves:

  1. Identifying a goshs server running with -b ':pass' and -sftp flags enabled
  2. Connecting to the SFTP service using any SFTP client
  3. Authenticating with any username and no password (or bypassing authentication entirely)
  4. Gaining unauthorized access to files served by the goshs instance

For technical details on the vulnerability mechanics, see the GitHub Security Advisory.

Detection Methods for CVE-2026-40884

Indicators of Compromise

  • Unexpected SFTP connections from unknown IP addresses without corresponding successful authentication log entries
  • Unauthenticated file access or transfer activity on the SFTP service
  • Presence of goshs processes running with -b ':pass' and -sftp flags in combination
  • Anomalous file read or write operations through the SFTP protocol

Detection Strategies

  • Audit running goshs instances for vulnerable configurations using the -b ':pass' and -sftp flag combination
  • Monitor SFTP connection logs for authentication bypass patterns where connections succeed without valid credentials
  • Implement network monitoring to detect SFTP connections to goshs servers from unexpected sources
  • Review process lists and startup scripts for vulnerable goshs configurations

Monitoring Recommendations

  • Enable comprehensive logging for all SFTP connection attempts and file access operations
  • Deploy network intrusion detection rules to identify unauthenticated SFTP session patterns
  • Implement file integrity monitoring on directories served by goshs SFTP services
  • Configure alerts for SFTP connections that do not have corresponding authentication success events

How to Mitigate CVE-2026-40884

Immediate Actions Required

  • Upgrade goshs to version 2.0.0-beta.6 or later immediately
  • If immediate upgrade is not possible, disable the SFTP service by removing the -sftp flag until patching is complete
  • Audit all goshs deployments to identify instances using the vulnerable -b ':pass' configuration pattern
  • Review file access logs to identify any potential unauthorized access that may have occurred prior to remediation

Patch Information

The vulnerability has been fixed in goshs version 2.0.0-beta.6. Organizations should upgrade to this version or later to remediate the vulnerability. The fix ensures that proper SFTP authentication handlers are installed even when using the empty-username basic authentication syntax. Additional details are available in the GitHub Security Advisory.

Workarounds

  • Disable SFTP functionality by removing the -sftp flag from goshs startup commands until the upgrade can be performed
  • Use a proper username in the basic authentication configuration (e.g., -b 'user:pass' instead of -b ':pass')
  • Implement network-level access controls to restrict SFTP port access to authorized hosts only
  • Deploy a reverse proxy or firewall rule to block external SFTP connections until the vulnerability is patched
bash
# Configuration example - Safe goshs startup with proper authentication
# Use explicit username instead of empty-username syntax
goshs -sftp -b 'admin:securepassword'

# Alternative: Disable SFTP until patched
goshs -b ':pass'
# (Note: Remove -sftp flag to disable vulnerable SFTP service)

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGoshs

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-306
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-40189: Goshs Auth Bypass Vulnerability

  • CVE-2026-34581: goshs Authentication Bypass Vulnerability

  • CVE-2026-40885: goshs Information Disclosure Vulnerability

  • CVE-2026-40883: goshs SimpleHTTPServer CSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English