GHSA-m83q-5wr4-4gfp

Suggest an improvement
Source
https://github.com/advisories/GHSA-m83q-5wr4-4gfp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-m83q-5wr4-4gfp/GHSA-m83q-5wr4-4gfp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m83q-5wr4-4gfp
Aliases
Published
2026-03-13T18:56:14Z
Modified
2026-03-24T21:16:21Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
SFTPGo improperly sanitizes placeholders in group home directories/key prefixes
Details

Impact

SFTPGo versions before v2.7.1 contain an input validation issue in the handling of dynamic group paths, for example, home directories or key prefixes.

When a group is configured with a dynamic home directory or key prefix using placeholders like %username%, the value replacing the placeholder is not strictly sanitized against relative path components. Consequently, if a user is created with a specially crafted username the resulting path may resolve to a parent directory instead of the intended sub-directory.

Patches

This issue is fixed in version v2.7.1

Database specific
{
    "cwe_ids":  [
        "CWE-20",
        "CWE-22"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-03-13T18:56:14Z",
    "nvd_published_at":  "2026-03-13T19:54:35Z",
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/drakkan/sftpgo/v2

Package

Name
github.com/drakkan/sftpgo/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/drakkan/sftpgo/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.3.0
Fixed
2.7.1

Database specific

last_known_affected_version_range
"<= 2.7.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-m83q-5wr4-4gfp/GHSA-m83q-5wr4-4gfp.json"