GHSA-5h6h-7rc9-3824 · 深刻度: high · エコシステム: go — SFTP root escape via prefix-based path validation in goshs
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.
総合評価: CVE-2026-40876 は悪用リスクが高い(62.4/100)。CVSS 深刻度は高。悪用される可能性が高い(EPSS 0.44%、35 パーセンタイル) 根拠: 公開エクスプロイトが 1 件参照されています(Exploit-DB)。 推奨対応: 公開エクスプロイトが確認されています。影響範囲の確認、緩和策の適用、パッチ適用を優先してください。
リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。
| EDB-ID | ソース | 種別 | 公開 | リンク |
|---|---|---|---|---|
| — | nvd_ref | exploit_tag | Exploit-DB ↗ |
EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。
| # | 日付 | 旧 EPSS スコア | 新 EPSS スコア | Δ(新 − 旧) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.05% | 0.44% | +0.39% |
| 2 | 2026-04-27 | 0.04% | 0.05% | +0.01% |
| 3 | 2026-04-22 | — | 0.04% | — |
EPSS の全履歴 (全 3 件)
この CVE の CVSS 指標。
| ベーススコア | バージョン | 深刻度 | ベクトル | 悪用しやすさ | 影響 | スコアの出典 |
|---|---|---|---|---|---|---|
| 8.7 | 4.0 | HIGH |
|
— | — | [email protected] |
| 8.8 | 3.1 | HIGH |
|
2.8 | 5.9 | [email protected] |
GHSA-5h6h-7rc9-3824 · 深刻度: high · エコシステム: go — SFTP root escape via prefix-based path validation in goshs
| ベンダー | 製品 | バージョン | 生の CPE |
|---|---|---|---|
| goshs | goshs | < 2.0.0 | cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:* |
| goshs | goshs | 2.0.0 | cpe:2.3:a:goshs:goshs:2.0.0:beta1:*:*:*:go:*:* |
| goshs | goshs | 2.0.0 | cpe:2.3:a:goshs:goshs:2.0.0:beta2:*:*:*:go:*:* |
| goshs | goshs | 2.0.0 | cpe:2.3:a:goshs:goshs:2.0.0:beta3:*:*:*:go:*:* |
| goshs | goshs | 2.0.0 | cpe:2.3:a:goshs:goshs:2.0.0:beta4:*:*:*:go:*:* |
| goshs | goshs | 2.0.0 | cpe:2.3:a:goshs:goshs:2.0.0:beta5:*:*:*:go:*:* |
| URL | タグ |
|---|---|
| https://github.com/patrickhener/goshs/security/advisories/GHSA-5h6h-7rc9-3824 | Exploit Vendor Advisory |