SFTP Command Rename Vulnerability in goshs by patrickhener
CVE-2026-40188
7.7HIGH
What is CVE-2026-40188?
The goshs application, a SimpleHTTPServer written in Go, presents a vulnerability in its SFTP command rename function. With versions ranging from 1.0.7 up to, but not including, 2.0.0-beta.4, the rename command only sanitizes the source path, neglecting the destination path. This oversight allows potential attackers to write files outside of the designated root directory of the SFTP server, leading to possible unauthorized access or data exposure. The flaw has been rectified in version 2.0.0-beta.4.
Affected Version(s)
goshs >= 1.0.7, < 2.0.0-beta.4
