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-40188

CVE-2026-40188: Goshs Path Traversal Vulnerability

CVE-2026-40188 is a path traversal vulnerability in Goshs SimpleHTTPServer allowing attackers to write files outside the SFTP root directory. This article covers technical details, affected versions, impact, and mitigation.

Published: April 17, 2026

CVE-2026-40188 Overview

CVE-2026-40188 is a path traversal vulnerability in goshs, a SimpleHTTPServer written in Go. The vulnerability exists in versions from 1.0.7 to before 2.0.0-beta.4, where the SFTP command rename function sanitizes only the source path and not the destination path. This improper sanitization allows an attacker to write files outside of the intended SFTP root directory, potentially leading to unauthorized file modifications on the target system.

Critical Impact

Authenticated attackers can write arbitrary files outside the SFTP root directory, potentially overwriting critical system files or placing malicious content in sensitive locations.

Affected Products

  • goshs versions 1.0.7 through 2.0.0-beta.3
  • goshs 2.0.0-beta1
  • goshs 2.0.0-beta2
  • goshs 2.0.0-beta3

Discovery Timeline

  • 2026-04-10 - CVE CVE-2026-40188 published to NVD
  • 2026-04-14 - Last updated in NVD database

Technical Details for CVE-2026-40188

Vulnerability Analysis

This path traversal vulnerability (CWE-1314: Missing Write Protection for Parametric Data Values) stems from inconsistent input validation in the SFTP rename command handler. While the goshs application correctly sanitizes the source file path to prevent path traversal attacks, it fails to apply the same sanitization to the destination path parameter. This asymmetric validation creates an exploitable condition where an authenticated SFTP user can leverage the rename operation to move files to arbitrary locations on the file system, bypassing the intended SFTP root directory restrictions.

The impact of this vulnerability is significant as it allows authenticated users to write files outside the designated SFTP root, potentially enabling them to overwrite configuration files, place malicious executables in system paths, or modify application data in unauthorized locations.

Root Cause

The root cause is inadequate input validation in the SFTP rename command implementation. The source path undergoes proper sanitization to remove path traversal sequences (such as ../), but the destination path is passed directly to the underlying file system operation without similar sanitization. This oversight allows attackers to construct a destination path containing directory traversal sequences that escape the SFTP root directory.

Attack Vector

The attack requires network access and low-level authentication (valid SFTP credentials). An attacker with legitimate SFTP access can exploit this vulnerability by issuing a rename command with a properly formatted source path and a malicious destination path containing traversal sequences. The command structure allows the attacker to specify a destination like ../../etc/cron.d/malicious which would escape the SFTP root and write to the system cron directory.

The vulnerability can be exploited through standard SFTP client connections where the attacker:

  1. Authenticates to the goshs SFTP server with valid credentials
  2. Creates or uploads a file within the allowed SFTP root
  3. Issues a rename command with a valid source path and a path-traversed destination
  4. The file is moved to the attacker-specified location outside the SFTP root

Detection Methods for CVE-2026-40188

Indicators of Compromise

  • SFTP rename commands with destination paths containing ../ sequences
  • Files appearing in unexpected system locations with modification times corresponding to SFTP session activity
  • Log entries showing rename operations with destination paths outside the SFTP root directory
  • Unexpected file modifications in system configuration directories during active SFTP sessions

Detection Strategies

  • Monitor SFTP server logs for rename operations with suspicious destination path patterns
  • Implement file integrity monitoring on critical system directories to detect unauthorized writes
  • Deploy SentinelOne behavioral AI to detect anomalous file system operations from SFTP server processes
  • Configure alerting for any file writes by the goshs process to locations outside its designated root

Monitoring Recommendations

  • Enable verbose logging in goshs to capture all SFTP command operations including full path parameters
  • Use SentinelOne Singularity XDR to correlate SFTP activity with file system changes
  • Implement real-time monitoring of the goshs process for child processes or unexpected file operations

How to Mitigate CVE-2026-40188

Immediate Actions Required

  • Upgrade goshs to version 2.0.0-beta.4 or later immediately
  • Review SFTP access logs for any evidence of exploitation attempts using path traversal patterns
  • Audit file system integrity, particularly in directories outside the SFTP root that may have been modified
  • Restrict SFTP access to only necessary users pending the upgrade

Patch Information

The vulnerability has been fixed in goshs version 2.0.0-beta.4. The fix ensures that both source and destination paths in SFTP rename operations are properly sanitized to prevent path traversal. The security patch can be obtained from the GitHub Release v2.0.0-beta.4. For detailed information about the changes, review the GitHub Commit Change and the GitHub Security Advisory GHSA-2943.

Workarounds

  • Disable SFTP functionality entirely if the rename command is not required for operations
  • Implement network-level access controls to restrict SFTP connections to trusted IP addresses only
  • Use a reverse proxy or firewall to inspect and block SFTP commands containing path traversal sequences
  • Run goshs with minimal file system permissions to limit the impact of potential exploitation
bash
# Configuration example: Restrict network access to goshs SFTP service
# Using iptables to limit SFTP access to trusted networks only
iptables -A INPUT -p tcp --dport 8022 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 8022 -j DROP

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGoshs

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1314
  • Technical References
  • GitHub Release v2.0.0-beta.4
  • Vendor Resources
  • GitHub Commit Change

  • GitHub Security Advisory GHSA-2943
  • Related CVEs
  • CVE-2026-40876: goshs SFTP Path Traversal Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal Vulnerability

  • CVE-2026-35392: Goshs Path Traversal 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