Vulnerabilities in pkg:golang/github.com/drakkan/sftpgo

PACKAGE
Advisory Identifier: GHSA-x8qh-7475-c5mp
Advisory Summary

CVE-2026-30914 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/drakkan/sftpgo/v2 libraries in the Go ecosystem. The issue involves sftpgo vulnerable to path traversal and permission bypass via path normalization discrepancy. Remediation is available by upgrading affected packages to version 2.7.1.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/drakkan/sftpgo

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/drakkan/sftpgo. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x8qh-7475-c5mp CVE-2026-30914 MODERATE SFTPGo Vulnerable to Path Traversal and Permission Bypass via Path Normalization Discrepancy
GHSA-vj7w-3m8c-6vpx CVE-2025-24366 HIGH SFTPGo has insufficient sanitization of user provided rsync command
GHSA-cf7g-cm7q-rq7f CVE-2022-39220 MODERATE SFTPGo WebClient vulnerable to Cross-site Scripting

CVE-2026-30914 at a Glance

CVE Identifier CVE-2026-30914
GHSA Identifier GHSA-x8qh-7475-c5mp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/drakkan/sftpgo/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-30914

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.

github.com/drakkan/sftpgo/v2 fixed: 2.7.1
Upgrade github.com/drakkan/sftpgo/v2 to 2.7.1
github.com/drakkan/sftpgo fixed: Latest secure release
Upgrade github.com/drakkan/sftpgo to Latest secure release
Verify Direct and Transitive Dependencies

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-30914, 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

### Impact In SFTPGo versions prior to 2.7.1, a path normalization discrepancy between the protocol handlers and the internal Virtual Filesystem routing can lead to an authorization bypass. An authenticated attacker can craft specific file paths to bypass folder-level permissions or escape the boundaries of a configured Virtual Folder. ### Patches This issue has been addressed in SFTPGo version 2.7.1. The fix introduces strict edge-level path normalization, ensuring that all protocol inputs are fully sanitized and resolved to canonical POSIX paths before any routing or permission evaluations occur.

CVE-2026-30914 Affected Github.com/drakkan/sftpgo/v2 Versions

2 component(s)
Fixed Versions:
2.7.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/drakkan/sftpgo/v2
Go
< 2.7.1
2.7.1
github.com/drakkan/sftpgo
Go
≤ 1.2.2

References

Frequently Asked Questions

What is CVE-2026-30914?
CVE-2026-30914 is a security vulnerability in Github.com/drakkan/sftpgo/v2 involving SFTPGo Vulnerable to Path Traversal and Permission Bypass via Path Normalization Discrepancy under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/drakkan/sftpgo/v2 versions are affected?
Affected versions include releases prior to 2.7.1 across affected packages: github.com/drakkan/sftpgo/v2, github.com/drakkan/sftpgo.
What version fixes CVE-2026-30914?
Upgrading to 2.7.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/drakkan/sftpgo/v2 affected?
Yes, github.com/drakkan/sftpgo/v2 is affected in releases prior to 2.7.1. Upgrade your dependency to 2.7.1 or later.
Is github.com/drakkan/sftpgo affected?
Yes, github.com/drakkan/sftpgo is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2026-30914?
CVE-2026-30914 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-30914?
Run the dependency tree command: 'inspect dependencies for github.com/drakkan/sftpgo/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x8qh-7475-c5mp",
  "modified" : "2026-03-24T20:57:44Z",
  "published" : "2026-03-13T18:55:52Z",
  "aliases" : [ "CVE-2026-30914" ],
  "summary" : "SFTPGo Vulnerable to Path Traversal and Permission Bypass via Path Normalization Discrepancy",
  "details" : "### Impact\n\nIn SFTPGo versions prior to 2.7.1, a path normalization discrepancy between the protocol handlers and the internal Virtual Filesystem routing can lead to an authorization bypass. An authenticated attacker can craft specific file paths to bypass folder-level permissions or escape the boundaries of a configured Virtual Folder.\n\n\n### Patches\n\nThis issue has been addressed in SFTPGo version 2.7.1. The fix introduces strict edge-level path normalization, ensuring that all protocol inputs are fully sanitized and resolved to canonical POSIX paths before any routing or permission evaluations occur.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/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" : "0"
      }, {
        "fixed" : "2.7.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.7.0"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/drakkan/sftpgo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/drakkan/sftpgo/security/advisories/GHSA-x8qh-7475-c5mp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30914"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/drakkan/sftpgo/commit/2f092d128917e2c059520a2ce3e22c3b5ea7ffd6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/drakkan/sftpgo"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2026-4699"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-13T18:55:52Z",
    "nvd_published_at" : "2026-03-13T19:54:35Z"
  }
}