CVE-2024-52801: Github.com/drakkan/sftpgo/v2 Remote Code Execution Vulnerability
MODERATECVE-2024-52801 is a MODERATE remote code execution vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Github.com/drakkan/sftpgo/v2 libraries in the Go ecosystem. The issue involves sftpgo vulnerable to brute force takeover of openid connect session cookies. Remediation is available by upgrading affected packages to version 2.6.4.
CVE-2024-52801 at a Glance
How to Fix CVE-2024-52801
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.4
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-52801, 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.4), 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. 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-52801 Affected Github.com/drakkan/sftpgo/v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/drakkan/sftpgo/v2
|
Go |
≥ 2.3.0
< 2.6.4
|
2.6.4
|
References
Frequently Asked Questions
What is CVE-2024-52801?
Which Github.com/drakkan/sftpgo/v2 versions are affected?
What version fixes CVE-2024-52801?
Is github.com/drakkan/sftpgo/v2 affected?
What CWE is associated with CVE-2024-52801?
How can I check Go dependencies for CVE-2024-52801?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6943-qr24-82vx",
"modified" : "2024-12-02T22:05:00Z",
"published" : "2024-12-02T17:16:34Z",
"aliases" : [ "CVE-2024-52801" ],
"summary" : "sftpgo vulnerable to brute force takeover of OpenID Connect session cookies",
"details" : "### Impact\n\nThe OpenID Connect implementation, in the affected SFTPGo versions, allows authenticated users to brute force session cookies and thereby gain access to other users' data, since the cookies are generated predictably using the [xid](https://github.com/rs/xid) library and are therefore unique but not cryptographically secure.\n\n### Patches\n\nThis issue was fixed in version v2.6.4, where cookies are opaque and cryptographically secure strings.\n\n### References\n\nhttps://github.com/drakkan/sftpgo/commit/f30a9a2095bf90c0661b04fe038e3b7efc788bc6\n",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/drakkan/sftpgo/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.6.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/security/advisories/GHSA-6943-qr24-82vx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52801"
}, {
"type" : "WEB",
"url" : "https://github.com/drakkan/sftpgo/commit/f30a9a2095bf90c0661b04fe038e3b7efc788bc6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/drakkan/sftpgo"
}, {
"type" : "WEB",
"url" : "https://github.com/rs/xid"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-327" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-02T17:16:34Z",
"nvd_published_at" : "2024-11-29T19:15:08Z"
}
}