Missing Write Protection for Parametric Data Values Affecting github.com/patrickhener/goshs/sftpserver package, versions >=1.0.7 <2.0.0-beta.4


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.32% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMPATRICKHENERGOSHSSFTPSERVER-16304804
  • published27 Apr 2026
  • disclosed10 Apr 2026
  • creditmarduc812

Introduced: 10 Apr 2026

CVE-2026-40188  (opens in a new tab)
CWE-1314  (opens in a new tab)

How to fix?

Upgrade github.com/patrickhener/goshs/sftpserver to version 2.0.0-beta.4 or higher.

Overview

Affected versions of this package are vulnerable to Missing Write Protection for Parametric Data Values through improper sanitization of the destination path in the rename process. An attacker can overwrite files outside the intended root directory by supplying crafted destination paths.

CVSS Base Scores

version 4.0
version 3.1