{"answers":{"affected":"3 open source packages ship an affected version, including github.com/syncthing/syncthing and syncthing. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46165 exists.","fix":"Upgrade github.com/syncthing/syncthing to 1.23.5 or later.","what":"CVE-2022-46165 is a medium-severity cross-site scripting vulnerability in syncthing, published on 6 Jun 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-46165 and fix it if it is affected.\n\nWhat it is: CVE-2022-46165 is a medium-severity cross-site scripting vulnerability in syncthing, published on 6 Jun 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46165 exists.\n\nAffected packages and fixed versions:\n- github.com/syncthing/syncthing (Go): affected all versions; fixed in 1.23.5\n- github.com/syncthing/syncthing (Go): affected all versions; fixed in 1.23.5\n- syncthing (Bitnami): affected all versions; fixed in 1.23.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-46165/ (Markdown: https://insights.sbomify.com/CVE-2022-46165/index.md)","id":"CVE-2022-46165","markdown":"https://insights.sbomify.com/CVE-2022-46165/index.md","name":"CVE-2022-46165","record":{"aliases":["BIT-syncthing-2022-46165","DEBIAN-CVE-2022-46165","GHSA-9rp6-23gf-4c3h","UBUNTU-CVE-2022-46165","openSUSE-SU-2023:0126-1","openSUSE-SU-2024:12984-1"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Syncthing file sync","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary scripts in the Syncthing web interface via malicious file names, potentially altering settings or adding devices.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"syncthing","vendor":"syncthing"}],"cvss":{"score":4.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Syncthing is an open source, continuous file synchronization program. In versions prior to 1.23.5 a compromised instance with shared folders could sync malicious files which contain arbitrary HTML and JavaScript in the name. If the owner of another device looks over the shared folder settings and moves the mouse over the latest sync, a script could be executed to change settings for shared folders or add devices automatically. Additionally adding a new device with a malicious name could embed HTML or JavaScript inside parts of the page. As a result the webUI may be subject to a stored cross site scripting attack. This issue has been addressed in version 1.23.5. Users are advised to upgrade. Users unable to upgrade should avoid sharing folders with untrusted users.","ecosystems":["Bitnami","Go","SUSE:Package Hub 15 SP5","openSUSE:Leap 15.5","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cross-site Scripting (XSS) in Web GUI in syncthing","id":"CVE-2022-46165","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":6,"n_references":4,"next":{"headline":"Spring Boot Admins integrated notifier support allows arbitrary code execution","id":"CVE-2022-46166"},"packages":[{"ecosystem":"Bitnami","fixed":["1.23.5"],"introduced":["0"],"last_affected":[],"package":"syncthing","purl":"pkg:bitnami/syncthing","source":"BIT-syncthing-2022-46165"},{"ecosystem":"Go","fixed":["1.23.5"],"introduced":["0"],"last_affected":[],"package":"github.com/syncthing/syncthing","purl":null,"source":"GHSA-9rp6-23gf-4c3h"},{"ecosystem":"Go","fixed":["1.23.5"],"introduced":["0"],"last_affected":[],"package":"github.com/syncthing/syncthing","purl":"pkg:golang/github.com/syncthing/syncthing","source":"GHSA-9rp6-23gf-4c3h"},{"ecosystem":"SUSE:Package Hub 15 SP5","fixed":["1.23.5-bp155.2.3.1"],"introduced":["0"],"last_affected":[],"package":"syncthing","purl":"pkg:rpm/suse/syncthing\u0026distro=SUSE%20Package%20Hub%2015%20SP5","source":"openSUSE-SU-2023:0126-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["1.23.5-bp155.2.3.1"],"introduced":["0"],"last_affected":[],"package":"syncthing","purl":"pkg:rpm/opensuse/syncthing\u0026distro=openSUSE%20Leap%2015.5","source":"openSUSE-SU-2023:0126-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.23.5-1.1"],"introduced":["0"],"last_affected":[],"package":"syncthing","purl":"pkg:rpm/opensuse/syncthing\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12984-1"}],"prev":{"headline":"Account takeover via prototype vulnerability","id":"CVE-2022-46164"},"products":["syncthing"],"published":"2023-06-06","related":[{"cvss_score":7.5,"headline":"Crash due to malformed relay protocol message","id":"CVE-2021-21404","kev_date_added":null,"published":"2021-04-06"},{"cvss_score":7.5,"headline":"Syncthing vulnerable to symlink traversal and arbitrary file overwrite","id":"CVE-2017-1000420","kev_date_added":null,"published":"2018-01-02"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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":"SUSE","prefix":"openSUSE"},{"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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["syncthing"]},"summary":"Attackers can execute arbitrary scripts in the Syncthing web interface via malicious file names, potentially altering settings or adding devices.","url":"https://insights.sbomify.com/CVE-2022-46165/"}