Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to goshs SFTP server
-
ExploitCraft rename command with unsanitized destination path
-
ExecutionTraverse directory structure using path traversal
-
ImpactWrite files outside root directory
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Requires authenticated SFTP access to goshs versions 1.0.7 through 2.0.0-beta.3. Attacker with valid SFTP credentials can exploit the rename command's unsanitized destination path parameter to write files outside the configured root directory. No user interaction needed. |
| Impact | Authenticated path traversal in SFTP rename allows writing arbitrary files outside configured root, with high integrity impact across systems (CVSS 7.7, EPSS data unavailable). Affects versions 1.0.7-2.0.0-beta.3. Requires valid SFTP credentials but no user interaction. Critical for multi-tenant or restricted-access deployments. |
| Exploit ScenarioDerived | Authenticated attacker connects to SFTP, calls rename with sanitized source and malicious destination (e.g., ../../../etc/passwd), bypassing path validation on destination only. Single command writes to host filesystem outside intended sandbox. No POC code identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 10, 2026
Path traversal in patrickhener goshs SFTP rename operation enables authenticated attackers to write files outside the configured root directory. Versions 1.0.7 through 2.0.0-beta.3 fail to sanitize destination paths in SFTP rename commands, allowing low-privileged users to overwrite arbitrary filesystem locations with network access. High integrity impact with scope change indicates potential host compromise. No public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to goshs version 2.0.0-beta.4 or later, which implements destination path sanitization in SFTP rename operations. The fix is implemented in commit 141c188ce270ffbec087844a50e5e695b7da7744. If immediate upgrade is infeasible, disable SFTP functionality or restrict SFTP access to fully trusted users until patching. Verify no unauthorized files exist outside the intended root directory post-remediation. Full advisory available at https://github.com/patrickhener/goshs/security/advisories/GHSA-2943-crp8-38xx and release notes at https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4. EPSS scoring indicates low observed exploitation activity.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-1314 path traversal via incomplete input sanitization. The SFTP rename command implementation applies path normalization exclusively to source arguments while passing destination paths unchecked, enabling directory traversal sequences (../) to escape the chroot-style containment. CVSS scope change reflects potential impact beyond the vulnerable component's security boundary.
Know when Goshs gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
goshs is a SimpleHTTPServer written in Go. From 1.0.7 to before 2.0.0-beta.4, the SFTP command rename sanitizes only the source path and not the destination, so it is possible to write outside of the root directory of the SFTP. This vulnerability is fixed in 2.0.0-beta.4.
Executive ViewAI
CVE-2026-40188 is a path traversal vulnerability in patrickhener goshs SFTP service that allows authenticated users to write files outside intended directories, potentially enabling unauthorized system modification or compromise. Organizations using affected versions (1.0.7 through 2.0.0-beta.3) should prioritize patching to prevent privilege escalation and data integrity violations through SFTP rename operations.
Apply vendor patch. Interim mitigations if patch deployment is delayed: (1) Restrict SFTP service network access via firewall rules to trusted administrative users only; (2) Implement file integrity monitoring on critical system directories; (3) Disable SFTP rename functionality at the application level if feasible; (4) Monitor and alert on SFTP operations targeting paths outside configured root directories.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Critical authorization bypass in goshs (Go-based HTTP server) versions prior to 2.0.0-beta.4 allows unauthenticated atta
Improper enforcement of the `--no-delete` flag in goshs WebDAV server allows unauthorized file deletion or overwrite. Th
Path traversal in goshs file server allows unauthenticated remote attackers to write files outside the served directory
Remote unauthenticated attackers can leak GitHub workflow tokens from goshs repositories via ArtiPACKED attack. The vuln
goshs SimpleHTTPServer versions prior to 2.0.2 allow arbitrary file write via cross-origin PUT requests due to missing C
A path equivalence bypass in goshs lets attackers retrieve blocked files and the ACL configuration file by appending a t
Same technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-21589
GHSA-2943-crp8-38xx
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB