{"answers":{"affected":"4 open source packages ship an affected version, including github.com/drakkan/sftpgo and github.com/drakkan/sftpgo/v2. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39220 in the wild and no public exploit code.","fix":"Upgrade github.com/drakkan/sftpgo to 2.3.5 or later.","what":"CVE-2022-39220 is a medium-severity cross-site scripting vulnerability in drakkan sftpgo, published on 20 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-39220 and fix it if it is affected.\n\nWhat it is: CVE-2022-39220 is a medium-severity cross-site scripting vulnerability in drakkan sftpgo, published on 20 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-39220 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/drakkan/sftpgo (Go): affected all versions; no fix listed\n- github.com/drakkan/sftpgo (Go): affected all versions; fixed in 2.3.5\n- github.com/drakkan/sftpgo (Go): affected all versions; fixed in 2.3.5\n- github.com/drakkan/sftpgo/v2 (Go): affected all versions; fixed in 2.3.5\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-2022-39220/ (Markdown: https://insights.sbomify.com/CVE-2022-39220/index.md)","id":"CVE-2022-39220","markdown":"https://insights.sbomify.com/CVE-2022-39220/index.md","name":"CVE-2022-39220","record":{"aliases":["GHSA-cf7g-cm7q-rq7f","GO-2022-1015"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"SFTPGo web client","requires_auth":"none","summary":"Remote attackers can inject malicious scripts into the SFTPGo web client, potentially leading to code execution or account takeover.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"sftpgo","vendor":"sftpgo_project"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"SFTPGo is an SFTP server written in Go. Versions prior to 2.3.5 are subject to Cross-site scripting (XSS) vulnerabilities in the SFTPGo WebClient, allowing remote attackers to inject malicious code. This issue is patched in version 2.3.5. No known workarounds exist.","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":"XSS Vulnerabilities in WebClient","id":"CVE-2022-39220","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":4,"n_references":1,"next":{"headline":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') McWebserver Minecraft Mod","id":"CVE-2022-39221"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo","purl":"pkg:golang/github.com/drakkan/sftpgo","source":"GO-2022-1015"},{"ecosystem":"Go","fixed":["2.3.5"],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo","purl":null,"source":"GHSA-cf7g-cm7q-rq7f"},{"ecosystem":"Go","fixed":["2.3.5"],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo","purl":"pkg:golang/github.com/drakkan/sftpgo","source":"GHSA-cf7g-cm7q-rq7f"},{"ecosystem":"Go","fixed":["2.3.5"],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":"pkg:golang/github.com/drakkan/sftpgo/v2","source":"GO-2022-1015"}],"prev":{"headline":"Bifrost users using basic authntication can bypass write permission limit","id":"CVE-2022-39219"},"products":["sftpgo"],"published":"2022-09-20","related":[{"cvss_score":8.3,"headline":"Recovery codes abuse in SFTPGo","id":"CVE-2022-36071","kev_date_added":null,"published":"2022-09-02"},{"cvss_score":5.3,"headline":"SFTPGo has a Path Traversal and Permission Bypass via Path Normalization Discrepancy","id":"CVE-2026-30914","kev_date_added":null,"published":"2026-03-13"},{"cvss_score":5.3,"headline":"SFTPGo improperly sanitizes placeholders in group home directories/key prefixes","id":"CVE-2026-30915","kev_date_added":null,"published":"2026-03-13"}],"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":"US public information, NVD API terms","name":"NVD"},{"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":"2025-04-23","vendors":["drakkan"]},"summary":"Remote attackers can inject malicious scripts into the SFTPGo web client, potentially leading to code execution or account takeover.","url":"https://insights.sbomify.com/CVE-2022-39220/"}