CVE-2024-52309: Github.com/drakkan/sftpgo/v2 SFTPGo Allows Administrators To Restrict Vulnerability
MODERATECVE-2024-52309 is a MODERATE sftpgo allows administrators to restrict vulnerability (General Security Weakness) affecting Github.com/drakkan/sftpgo/v2 libraries in the Go ecosystem. The issue involves sftpgo allows administrators to restrict command execution from the eventmanager. Remediation is available by upgrading affected packages to version 2.6.3.
CVE-2024-52309 at a Glance
How to Fix CVE-2024-52309
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.6.3
Upgrade sftpgo to 2.6.3
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-2024-52309, 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.6.3), 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 General Security Weakness. 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-2024-52309 Affected Github.com/drakkan/sftpgo/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/drakkan/sftpgo/v2
|
Go |
≥ 2.4.0
< 2.6.3
|
2.6.3
|
|
sftpgo
|
Go |
≥ 2.4.0
< 2.6.3
|
2.6.3
|
References
Frequently Asked Questions
What is CVE-2024-52309?
Which Github.com/drakkan/sftpgo/v2 versions are affected?
What version fixes CVE-2024-52309?
Is github.com/drakkan/sftpgo/v2 affected?
Is sftpgo affected?
What CWE is associated with CVE-2024-52309?
How can I check Go dependencies for CVE-2024-52309?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-49cc-xrjf-9qf7",
"modified" : "2024-12-02T18:04:00Z",
"published" : "2024-11-21T23:19:07Z",
"aliases" : [ "CVE-2024-52309" ],
"summary" : "SFTPGo allows administrators to restrict command execution from the EventManager",
"details" : "### Impact\n\nOne powerful feature of SFTPGo is the ability to have the EventManager execute scripts or run applications in response to certain events.\nThis feature is very common in all software similar to SFTPGo and is generally unrestricted. \n\nHowever, 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, so they can access the database and server configurations.\n\nThis 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.\n\n### Patches\n\nTo avoid this confusion, running system commands is now disabled by default, 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.\n\nhttps://github.com/drakkan/sftpgo/commit/88b1850b5806eee81150873d4e565144b21021fb\nhttps://github.com/drakkan/sftpgo/commit/b524da11e9466d05fe03304713ee1c61bb276ec4\n\n### Workarounds\n\nAllow EventManager to be used only by SFTPGo administrators who also have shell access.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/drakkan/sftpgo/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0"
}, {
"fixed" : "2.6.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "sftpgo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0"
}, {
"fixed" : "2.6.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/security/advisories/GHSA-49cc-xrjf-9qf7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52309"
}, {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/commit/88b1850b5806eee81150873d4e565144b21021fb"
}, {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/commit/b524da11e9466d05fe03304713ee1c61bb276ec4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/drakkan/sftpgo"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3283"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-21T23:19:07Z",
"nvd_published_at" : null
}
}