CVE-2022-46165
Cross-site Scripting (XSS) in Web GUI in syncthing
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.6
Cross-site Scripting (XSS) in Web GUI in syncthing
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.
- Record
CVE-2022-46165- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2023-1766
4.6
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.
- Record
EUVD-2023-1766- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-9rp6-23gf-4c3h
4.6
syncthing vulnerable to Cross-site Scripting (XSS) in Web GUI
Impact
-
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.
-
Adding a new device with a malicious name could embed HTML or JavaScript inside parts of the page.
Risk
As long as trusted devices are used, the risk is low. Additionally, the web GUI is not used that often in daily use which reduces the likelihood of exploitation.
Details
1. Field "Latest Change"
- Open the web GUI at http://127.0.0.1:8384/.
- Create/Delete a file named
<img src=a onerror=alert(123)>and sync it to the other instance. - Move your mouse over the latest change to trigger the tooltip.
<img width="834" alt="latest-change" src="https://user-images.githubusercontent.com/9484134/205084362-20a8ec13-a88d-469f-bdf1-e5291c20f4c1.png">
Web browser source
<span tooltip="" data-original-title="\"><img src=a onerror=alert(123)> @ 2022-11-30 16:58:43"
aria-describedby="tooltip409527">
<!-- ngIf: !folderStats[folder.id].lastFile.deleted --><span translate=""
translate-value-file=""><img src=a onerror=alert(123)>" ng-if="!folderStats[folder.id].lastFile.deleted"
class="ng-scope">Updated "><img src=a onerror=alert(123)></span>
<!-- end ngIf: !folderStats[folder.id].lastFile.deleted -->
<!-- ngIf: folderStats[folder.id].lastFile.deleted -->
</span>
<div class="tooltip fade top in" role="tooltip" id="tooltip409527"
style="top: 446.033px; left: 318.3px; display: block;">
<div class="tooltip-arrow" style="left: 50%;"></div>
<div class="tooltip-inner">\"><img src="a" onerror="alert(123)"> @ 2022-11-30 16:58:43</div>
</div>
Corresponding code in the project
File gui/default/index.html:
<tr ng-if="folder.type != 'sendonly' && folder.type != 'receiveencrypted' && folderStats[folder.id].lastFile && folderStats[folder.id].lastFile.filename">
<th><span class="fas fa-fw fa-exchange-alt"></span> <span translate>Latest Change</span></th>
<td class="text-right">
<span tooltip data-original-title="{{folderStats[folder.id].lastFile.filename}} @ {{folderStats[folder.id].lastFile.at | date:'yyyy-MM-dd HH:mm:ss'}}">
<span translate translate-value-file="{{folderStats[folder.id].lastFile.filename | basename}}" ng-if="!folderStats[folder.id].lastFile.deleted">Updated {%file%}</span>
<span translate translate-value-file="{{folderStats[folder.id].lastFile.filename | basename}}" ng-if="folderStats[folder.id].lastFile.deleted">Deleted {%file%}</span>
</span>
</td>
</tr>
File gui/default/syncthing/core/tooltipDirective.js:
angular.module('syncthing.core')
.directive('tooltip', function () {
return {
restrict: 'A',
link: function (scope, element, attributes) {
$(element).tooltip({
html: 'true'
});
}
};
});
The attribute html should not be set to true or input sanitized.
2. Field "Shared With"
- Open the web GUI at http://127.0.0.1:8384/.
- Create a device with the following name
fedora 1"'><h1>Headline</h1><img src=x><script>alert(1)</script>. - Add the device to another instance and share a folder.
- Move your mouse over the malicious device name to trigger the tooltip.
<img width="608" alt="shared-with-1" src="https://user-images.githubusercontent.com/9484134/205084172-8cab2d0e-3257-46d5-be81-41fbd7228e0c.png">
Web browser source
<span tooltip="" data-original-title="fedora 1"'><h1>Headline</h1><img src=x><script>alert(1)</script> "
ng-bind-html="sharesFolder(folder)"…
- Record
GHSA-9rp6-23gf-4c3h- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
4.6
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.
- Record
CVE-2022-46165- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
4.6
Cross-site Scripting (XSS) in Web GUI in syncthing
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.
- Record
CVE-2022-46165- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-46165
5.4
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.
- Record
DEBIAN-CVE-2022-46165- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-03
Show 5 moreShow less
OSVGHSA-9rp6-23gf-4c3h
4.6
syncthing vulnerable to Cross-site Scripting (XSS) in Web GUI
Impact
-
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.
-
Adding a new device with a malicious name could embed HTML or JavaScript inside parts of the page.
Risk
As long as trusted devices are used, the risk is low. Additionally, the web GUI is not used that often in daily use which reduces the likelihood of exploitation.
Details
1. Field "Latest Change"
- Open the web GUI at http://127.0.0.1:8384/.
- Create/Delete a file named
<img src=a onerror=alert(123)>and sync it to the other instance. - Move your mouse over the latest change to trigger the tooltip.
<img width="834" alt="latest-change" src="https://user-images.githubusercontent.com/9484134/205084362-20a8ec13-a88d-469f-bdf1-e5291c20f4c1.png">
Web browser source
<span tooltip="" data-original-title="\"><img src=a onerror=alert(123)> @ 2022-11-30 16:58:43"
aria-describedby="tooltip409527">
<!-- ngIf: !folderStats[folder.id].lastFile.deleted --><span translate=""
translate-value-file=""><img src=a onerror=alert(123)>" ng-if="!folderStats[folder.id].lastFile.deleted"
class="ng-scope">Updated "><img src=a onerror=alert(123)></span>
<!-- end ngIf: !folderStats[folder.id].lastFile.deleted -->
<!-- ngIf: folderStats[folder.id].lastFile.deleted -->
</span>
<div class="tooltip fade top in" role="tooltip" id="tooltip409527"
style="top: 446.033px; left: 318.3px; display: block;">
<div class="tooltip-arrow" style="left: 50%;"></div>
<div class="tooltip-inner">\"><img src="a" onerror="alert(123)"> @ 2022-11-30 16:58:43</div>
</div>
Corresponding code in the project
File gui/default/index.html:
<tr ng-if="folder.type != 'sendonly' && folder.type != 'receiveencrypted' && folderStats[folder.id].lastFile && folderStats[folder.id].lastFile.filename">
<th><span class="fas fa-fw fa-exchange-alt"></span> <span translate>Latest Change</span></th>
<td class="text-right">
<span tooltip data-original-title="{{folderStats[folder.id].lastFile.filename}} @ {{folderStats[folder.id].lastFile.at | date:'yyyy-MM-dd HH:mm:ss'}}">
<span translate translate-value-file="{{folderStats[folder.id].lastFile.filename | basename}}" ng-if="!folderStats[folder.id].lastFile.deleted">Updated {%file%}</span>
<span translate translate-value-file="{{folderStats[folder.id].lastFile.filename | basename}}" ng-if="folderStats[folder.id].lastFile.deleted">Deleted {%file%}</span>
</span>
</td>
</tr>
File gui/default/syncthing/core/tooltipDirective.js:
angular.module('syncthing.core')
.directive('tooltip', function () {
return {
restrict: 'A',
link: function (scope, element, attributes) {
$(element).tooltip({
html: 'true'
});
}
};
});
The attribute html should not be set to true or input sanitized.
2. Field "Shared With"
- Open the web GUI at http://127.0.0.1:8384/.
- Create a device with the following name
fedora 1"'><h1>Headline</h1><img src=x><script>alert(1)</script>. - Add the device to another instance and share a folder.
- Move your mouse over the malicious device name to trigger the tooltip.
<img width="608" alt="shared-with-1" src="https://user-images.githubusercontent.com/9484134/205084172-8cab2d0e-3257-46d5-be81-41fbd7228e0c.png">
Web browser source
<span tooltip="" data-original-title="fedora 1"'><h1>Headline</h1><img src=x><script>alert(1)</script> "
ng-bind-html="sharesFolder(folder)"…
- Record
GHSA-9rp6-23gf-4c3h- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-46165
4.6
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.
- Record
UBUNTU-CVE-2022-46165- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVBIT-syncthing-2022-46165 No score
Cross-site Scripting (XSS) in Web GUI in syncthing
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.
- Record
BIT-syncthing-2022-46165- Updated
- 2026-11-02
OSVopenSUSE-SU-2023:0126-1 No score
Security update for syncthing
This update for syncthing fixes the following issues:
-
Update to 1.13.5
-
This release fixes CVE-2022-46165 “Cross-site Scripting (XSS) in Web GUI”
-
Bugfixes:
#8503: 'syncthing cli config devices add' reflect error when using --addresses flag #8764: Ignore patterns creating during folder addition are not loaded #8778: Tests fail on Windows with Go 1.20 #8779: Test cleanup fails all model tests on Windows on Go 1.20 #8859: Incorrect handling of path for auto accepted folder
-
Other issues:
#8799: 'fatal error: checkptr: converted pointer straddles multiple allocations' in crypto tests
-
-
Update to 1.23.4
-
Bugfixes:
#8851: 'Running global migration to fix encryption file sizes' on every start
-
-
Update to 1.23.3
-
Bugfixes:
#5408: Selection of time in versions GUI not possible without editing the string inside the textfield #8277: Mutual encrypted sharing doesn't work (both sides with password) #8556: Increased file size when sharing between encrypted devices #8599: Key generation at connect time is slow for encrypted connections
-
Enhancements:
#7859: Allow sub-second watcher delay (use case: remote development)
-
Other issues:
#8828: cmd/stdiscosrv: TestDatabaseGetSet flake
-
-
Adding a desktop file for the Web UI
-
Update to 1.23.2
-
Bugfixes:
#8749: Relay listener does not restart sometimes
-
Enhancements:
#8660: GUI editor for xattr filter patterns #8781: gui: Remove duplicate Spanish translation
-
Other issues:
#8768: Update quic-go for Go 1.20
-
- Record
openSUSE-SU-2023:0126-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12984-1 No score
syncthing-1.23.5-1.1 on GA media
These are all security issues fixed in the syncthing-1.23.5-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12984-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/syncthing/syncthingGo |
before 1.23.5 | 1.23.5 |
syncthingBitnami |
before 1.23.5 | 1.23.5 |
syncthingDebian:12 |
All versions, plus listed versions 1.19.2~ds1-11.19.2~ds1-21.19.2~ds1-31.27.2~ds4-11.27.7~ds1-1 Show 10 moreShow less1.27.7~ds1-21.27.7~ds1-31.27.7~ds1-41.27.7~ds1-51.29.2~ds1-11.29.5~ds1-11.29.5~ds1-21.29.5~ds1-31.29.5~ds1-41.29.5~ds1-5 |
None known |
syncthingDebian:13 |
before 1.27.2~ds4-1 | 1.27.2~ds4-1 |
syncthingDebian:14 |
before 1.27.2~ds4-1 | 1.27.2~ds4-1 |
syncthingUbuntu:18.04:LTS |
All versions, plus listed versions 0.14.36+ds1-10.14.38+ds1-10.14.43+ds1-50.14.43+ds1-6 |
None known |
syncthingUbuntu:20.04:LTS |
All versions, plus listed versions 1.1.4~ds1-41.1.4~ds1-4ubuntu11.1.4~ds1-4ubuntu1.11.1.4~ds1-4ubuntu1.2 |
None known |
syncthingUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.12.1~ds1-41.18.0~ds1-31.18.0~ds1-3ubuntu0.11.18.0~ds1-3ubuntu0.21.18.0~ds1-3ubuntu0.31.18.0~ds1-3ubuntu0.3+esm11.18.0~ds1-3ubuntu0.3+esm2 |
None known |
syncthingUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 1.19.2~ds1-31.27.2~ds4-11.27.2~ds4-1ubuntu0.24.04.11.27.2~ds4-1ubuntu0.24.04.21.27.2~ds4-1ubuntu0.24.04.2+esm11.27.2~ds4-1ubuntu0.24.04.31.27.2~ds4-1ubuntu0.24.04.3+esm11.27.2~ds4-1ubuntu0.24.04.3+esm2 |
None known |
syncthingUbuntu:25.10 |
All versions, plus listed versions 1.29.2~ds1-11.29.5~ds1-2 |
None known |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
syncthingUbuntu:26.10 |
All versions, plus listed versions 1.29.5~ds1-31.29.5~ds1-4 |
None known |
syncthingUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 1.29.5~ds1-21.29.5~ds1-31.29.5~ds1-3ubuntu0.26.04.1~esm1 |
None known |
syncthingSUSE:Package Hub 15 SP5 |
before 1.23.5-bp155.2.3.1 | 1.23.5-bp155.2.3.1 |
syncthingopenSUSE:Leap 15.5 |
before 1.23.5-bp155.2.3.1 | 1.23.5-bp155.2.3.1 |
syncthingopenSUSE:Tumbleweed |
before 1.23.5-1.1 | 1.23.5-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-46165 is a medium vulnerability (CVSS 4.6) in Syncthing, published June 6, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.78%, the 56th percentile. Fixed in github.com/syncthing/syncthing 1.23.5.
References
github.com/syncthing/syncthing/security/advisories/GHSA-9rp6-23gf-4c3h
github.com/syncthing/syncthing/commit/73c52eafb6566435dffd979c3c49562b6d5a4238
lists.fedoraproject.org/archives/list/[email protected]/message/IRYGBFJPVBW6PPTETNIBWQJE4HJSA5PJ
lists.fedoraproject.org/archives/list/[email protected]/message/XEBWSQVGHSTR4ZO7LVVEMPEGMV2DS5XR
github.com/syncthing/syncthing/commit/f5e5af391a6583047c64ef8c51642003a79b75cf
github.com/syncthing/syncthing/releases/tag/v1.23.5
Show 10 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-46165
github.com/advisories/GHSA-9rp6-23gf-4c3h
github.com/CVEProject/cvelistV5/tree/main/cves/2022/46xxx/CVE-2022-46165.json
security-tracker.debian.org/tracker/CVE-2022-46165
github.com/syncthing/syncthing
ubuntu.com/security/CVE-2022-46165
cve.org/CVERecord?id=CVE-2022-46165
lists.opensuse.org/archives/list/[email protected]/thread/FSIGQKHWF6QOVLGHNMHBJX6N46RVSK5D
bugzilla.suse.com/1212085
suse.com/security/cve/CVE-2022-46165
Left out here: the rest of 2 source descriptions. The JSON record has them.