CVE-2024-52309 SFTPGo allows administrators to restrict command execution from the EventManager
Administrators with WebAdmin access can execute arbitrary system commands via EventManager, bypassing intended restrictions and gaining OS-level access.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-52309?
CVE-2024-52309 is a medium-severity vulnerability in drakkan sftpgo, published on 21 Nov 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Official 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.
Weakness: CWE-20
Which versions are affected by CVE-2024-52309?
6 open source packages ship an affected version, including github.com/drakkan/sftpgo/v2, github.com/drakkan/sftpgo and sftpgo.
| Package | Affected | Fixed in |
|---|---|---|
github.com/drakkan/sftpgo/v2 Go | From 2.4.0 | 2.6.3 |
github.com/drakkan/sftpgo/v2 Go | From 2.4.0 | 2.6.3 |
github.com/drakkan/sftpgo/v2 Go | From 2.4.0 | 2.6.3 |
github.com/drakkan/sftpgo Go | All versions | None |
sftpgo Go | From 2.4.0 | 2.6.3 |
sftpgo Go | From 2.4.0 | 2.6.3 |
How do I fix CVE-2024-52309?
Upgrade github.com/drakkan/sftpgo/v2 to 2.6.3 or later.
Is CVE-2024-52309 being exploited?
There is no known exploitation of CVE-2024-52309 in the wild and no public exploit code.
Sources
Also known as GHSA-49cc-xrjf-9qf7, GO-2024-3283.