csirt@kutim:~/threat-intel/cve/CVE-2026-40876

Katalog CVE

CVSS 8.8 · High EPSS 0,59%

Kerentanan Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') pada goshs. Skor CVSS 3.1 8.8 (High) menurut NVD.

Deskripsi (NVD)

goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.6, goshs contains an SFTP root escape caused by prefix-based path validation. An authenticated SFTP user can read from and write to filesystem paths outside the configured SFTP root, which breaks the intended jail boundary and can expose or modify unrelated server files. The SFTP subsystem routes requests through sftpserver/sftpserver.go into DefaultHandler.GetHandler() in sftpserver/handler.go, which forwards file operations into readFile, writeFile, listFile, and cmdFile. All of those sinks rely on sanitizePath() in sftpserver/helper.go. helper.go uses a raw string-prefix comparison, not a directory-boundary check. Because of that, if the configured root is /tmp/goshsroot, then a sibling path such as /tmp/goshsroot_evil/secret.txt incorrectly passes validation since it starts with the same byte prefix. This vulnerability is fixed in 2.0.0-beta.6.

Rincian

Terbit di NVD
21 April 2026
Terakhir diubah
17 Juni 2026
Status NVD
Analyzed
CVSS 3.1
8.8 (High), sumber NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H · uraikan di kalkulator
Jenis kelemahan (CWE)
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
EPSS (30 hari)
0,59% peluang dieksploitasi; lebih tinggi dari 46,8% CVE lain

Produk dan versi terdampak

VendorProdukVersi terdampak
goshs goshs Semua versi sebelum 2.0.0
goshs goshs Versi 2.0.0 beta1
goshs goshs Versi 2.0.0 beta2
goshs goshs Versi 2.0.0 beta3
goshs goshs Versi 2.0.0 beta4
goshs goshs Versi 2.0.0 beta5

> Data dari konfigurasi CPE di NVD.

Referensi dan perbaikan

Sumber: NVD · CVE.org · EPSS. Halaman ini disusun otomatis dari data tersebut; pembaruan terakhir 5 Okt 2026, 20:11 WITA. Kalau sistem di Perangkat Daerah memakai produk ini dan butuh bantuan, laporkan lewat kanal pelaporan.