# CVE-2026-30915: SFTPGo improperly sanitizes placeholders in group home directories/key prefixes

> Attackers can escape intended directories via crafted usernames in SFTPGo when dynamic group paths are configured, allowing unauthorized file access.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Mar 2026
- **Updated:** 13 Mar 2026
- **Also known as:** GHSA-m83q-5wr4-4gfp, GO-2026-4697

## What is CVE-2026-30915?

CVE-2026-30915 is a medium-severity path traversal vulnerability in drakkan sftpgo, published on 13 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

SFTPGo is an open source, event-driven file transfer solution. 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. This issue is fixed in version v2.7.1

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-30915?

4 open source packages ship an affected version, including github.com/drakkan/sftpgo/v2 and github.com/drakkan/sftpgo. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/drakkan/sftpgo/v2` | Go | From 2.3.0 | 2.7.1 |
| `github.com/drakkan/sftpgo/v2` | Go | From 2.3.0 | 2.7.1 |
| `github.com/drakkan/sftpgo/v2` | Go | From 2.3.0 | 2.7.1 |
| `github.com/drakkan/sftpgo` | Go | All versions | None |

Products: Sftpgo Project Sftpgo.

## How do I fix CVE-2026-30915?

Upgrade github.com/drakkan/sftpgo/v2 to 2.7.1 or later.

## Is CVE-2026-30915 being exploited?

There is no known exploitation of CVE-2026-30915 in the wild and no public exploit code.

## Other vulnerabilities in drakkan sftpgo

- [CVE-2022-36071](https://insights.sbomify.com/CVE-2022-36071/): Recovery codes abuse in SFTPGo (high 8.3)
- [CVE-2022-39220](https://insights.sbomify.com/CVE-2022-39220/): XSS Vulnerabilities in WebClient (medium 6.1)
- [CVE-2026-30914](https://insights.sbomify.com/CVE-2026-30914/): SFTPGo has a Path Traversal and Permission Bypass via Path Normalization Discrepancy (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-30915 and fix it if it is affected.

What it is: CVE-2026-30915 is a medium-severity path traversal vulnerability in drakkan sftpgo, published on 13 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-30915 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/drakkan/sftpgo/v2 (Go): affected from 2.3.0; fixed in 2.7.1
- github.com/drakkan/sftpgo/v2 (Go): affected from 2.3.0; fixed in 2.7.1
- github.com/drakkan/sftpgo/v2 (Go): affected from 2.3.0; fixed in 2.7.1
- github.com/drakkan/sftpgo (Go): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-30915/ (Markdown: https://insights.sbomify.com/CVE-2026-30915/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-30915
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-30915
- OSV: https://osv.dev/vulnerability/CVE-2026-30915

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-30915/
Summaries are generated and may contain mistakes; the official description above is the record.
