CVE-2026-40188 Details
Description
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.
A vulnerability exists in goshs versions 1.0.7 prior to 2.0.0-beta.4, specifically within the SFTP command rename functionality. The issue arises because the rename command only sanitizes the source path, leaving the destination path vulnerable. This oversight allows users to write files outside the designated root directory for SFTP uploads.
Users can update to goshs version 2.0.0-beta.4 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/patrickhener/goshs/security/advisories/GHSA-2943-crp8-38xx | CISA-ADP | ExploitVendor Advisory |
| https://github.com/patrickhener/goshs/commit/141c188ce270ffbec087844a50e5e695b7da7744 | [email protected] | Patch |
| https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4 | [email protected] | ProductRelease Notes |
| https://github.com/patrickhener/goshs/security/advisories/GHSA-2943-crp8-38xx | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1314 | Missing Write Protection for Parametric Data Values | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| goshs goshs | >= 1.0.7, < 2.0.0 2.0.0 beta1 2.0.0 beta2 2.0.0 beta3 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 14, 2026 | Initial Analysis | [email protected] |
| Apr 13, 2026 | CVE Modified | CISA-ADP |
| Apr 10, 2026 | New CVE Received | [email protected] |