{"answers":{"affected":"6 open source packages ship an affected version, including github.com/drakkan/sftpgo/v2, github.com/drakkan/sftpgo and sftpgo.","exploited":"There is no known exploitation of CVE-2024-52309 in the wild and no public exploit code.","fix":"Upgrade github.com/drakkan/sftpgo/v2 to 2.6.3 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2024-52309 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2024-52309 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.4.0; fixed in 2.6.3\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.4.0; fixed in 2.6.3\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.4.0; fixed in 2.6.3\n- github.com/drakkan/sftpgo (Go): affected all versions; no fix listed\n- sftpgo (Go): affected from 2.4.0; fixed in 2.6.3\n- sftpgo (Go): affected from 2.4.0; fixed in 2.6.3\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-52309/ (Markdown: https://insights.sbomify.com/CVE-2024-52309/index.md)","id":"CVE-2024-52309","markdown":"https://insights.sbomify.com/CVE-2024-52309/index.md","name":"CVE-2024-52309","record":{"aliases":["GHSA-49cc-xrjf-9qf7","GO-2024-3283"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":true,"product_category":"SFTPGo server","requires_auth":"high_privilege","summary":"Administrators with WebAdmin access can execute arbitrary system commands via EventManager, bypassing intended restrictions and gaining OS-level access.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.1,"severity":"medium","source":"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","version":"4.0"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"SFTPGo allows administrators to restrict command execution from the EventManager","id":"CVE-2024-52309","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":6,"n_references":3,"next":{"headline":"data.all does not invalidate authentication token upon user logout","id":"CVE-2024-52311"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo","purl":"pkg:golang/github.com/drakkan/sftpgo","source":"GO-2024-3283"},{"ecosystem":"Go","fixed":["2.6.3"],"introduced":["2.4.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":null,"source":"GHSA-49cc-xrjf-9qf7"},{"ecosystem":"Go","fixed":["2.6.3"],"introduced":["2.4.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":"pkg:golang/github.com/drakkan/sftpgo/v2","source":"GHSA-49cc-xrjf-9qf7"},{"ecosystem":"Go","fixed":["2.6.3"],"introduced":["2.4.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":"pkg:golang/github.com/drakkan/sftpgo/v2","source":"GO-2024-3283"},{"ecosystem":"Go","fixed":["2.6.3"],"introduced":["2.4.0"],"last_affected":[],"package":"sftpgo","purl":null,"source":"GHSA-49cc-xrjf-9qf7"},{"ecosystem":"Go","fixed":["2.6.3"],"introduced":["2.4.0"],"last_affected":[],"package":"sftpgo","purl":"pkg:golang/sftpgo","source":"GHSA-49cc-xrjf-9qf7"}],"prev":{"headline":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer","id":"CVE-2024-52308"},"products":["sftpgo"],"published":"2024-11-21","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-21","vendors":["drakkan"]},"summary":"Administrators with WebAdmin access can execute arbitrary system commands via EventManager, bypassing intended restrictions and gaining OS-level access.","url":"https://insights.sbomify.com/CVE-2024-52309/"}