CVE-2026-30915: Github.com/drakkan/sftpgo/v2 SFTPGo Improperly Sanitizes Placeholders Vulnerability
MODERATECVE-2026-30915 is a MODERATE sftpgo improperly sanitizes placeholders vulnerability (CWE-20: Improper Input Validation) affecting Github.com/drakkan/sftpgo/v2 libraries in the Go ecosystem. The issue involves sftpgo improperly sanitizes placeholders in group home directories/key prefixes. Remediation is available by upgrading affected packages to version 2.7.1.
CVE-2026-30915 at a Glance
How to Fix CVE-2026-30915
To remediate this vulnerability, upgrade all affected Github.com/drakkan/sftpgo/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/drakkan/sftpgo/v2 to 2.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/drakkan/sftpgo/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-30915, inspect your project dependencies for Github.com/drakkan/sftpgo/v2:
inspect dependencies for github.com/drakkan/sftpgo/v2
Analyze the terminal output to locate any version of Github.com/drakkan/sftpgo/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/drakkan/sftpgo/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-30915 Affected Github.com/drakkan/sftpgo/v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/drakkan/sftpgo/v2
|
Go |
≥ 2.3.0
< 2.7.1
|
2.7.1
|
References
Frequently Asked Questions
What is CVE-2026-30915?
Which Github.com/drakkan/sftpgo/v2 versions are affected?
What version fixes CVE-2026-30915?
Is github.com/drakkan/sftpgo/v2 affected?
What CWE is associated with CVE-2026-30915?
How can I check Go dependencies for CVE-2026-30915?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m83q-5wr4-4gfp",
"modified" : "2026-03-24T21:00:13Z",
"published" : "2026-03-13T18:56:14Z",
"aliases" : [ "CVE-2026-30915" ],
"summary" : "SFTPGo improperly sanitizes placeholders in group home directories/key prefixes",
"details" : "### Impact\n\nSFTPGo versions before v2.7.1 contain an input validation issue in the handling of dynamic group paths, for example, home directories or key prefixes.\n\nWhen 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.\n\n### Patches\n\nThis issue is fixed in version v2.7.1",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/drakkan/sftpgo/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.7.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.7.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/security/advisories/GHSA-m83q-5wr4-4gfp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30915"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/drakkan/sftpgo"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2026-4697"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T18:56:14Z",
"nvd_published_at" : "2026-03-13T19:54:35Z"
}
}