Every CVE Search/ Get API key

CVE-2022-46165

Cross-site Scripting (XSS) in Web GUI in syncthing

4.6 MediumFix available

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

0.78%Up 0.7 points since Jun 7, 2023
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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

  1. 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.

  2. 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="\&quot;><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="&quot;><img src=a onerror=alert(123)>" ng-if="!folderStats[folder.id].lastFile.deleted"
        class="ng-scope">Updated "&gt;&lt;img src=a onerror=alert(123)&gt;</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">\"&gt;<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>&nbsp;<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&quot;'><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 MediumCVSS: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 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
CVSS 3.1
5.4 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

  1. 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.

  2. 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="\&quot;><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="&quot;><img src=a onerror=alert(123)>" ng-if="!folderStats[folder.id].lastFile.deleted"
        class="ng-scope">Updated "&gt;&lt;img src=a onerror=alert(123)&gt;</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">\"&gt;<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>&nbsp;<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&quot;'><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 MediumCVSS: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 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
CVSS 3.1
5.4 MediumCVSS: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

Affected packages
PackageAffectedFixed
github.com/syncthing/syncthing
Go
before 1.23.5
1.23.5
syncthing
Bitnami
before 1.23.5
1.23.5
syncthing
Debian: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 less
1.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
syncthing
Debian:13
before 1.27.2~ds4-1
1.27.2~ds4-1
syncthing
Debian:14
before 1.27.2~ds4-1
1.27.2~ds4-1
syncthing
Ubuntu: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
syncthing
Ubuntu: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
syncthing
Ubuntu: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
syncthing
Ubuntu: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
syncthing
Ubuntu:25.10
All versions, plus listed versions
1.29.2~ds1-11.29.5~ds1-2
None known
Show 5 moreShow less
Affected packages
PackageAffectedFixed
syncthing
Ubuntu:26.10
All versions, plus listed versions
1.29.5~ds1-31.29.5~ds1-4
None known
syncthing
Ubuntu: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
syncthing
SUSE:Package Hub 15 SP5
before 1.23.5-bp155.2.3.1
1.23.5-bp155.2.3.1
syncthing
openSUSE:Leap 15.5
before 1.23.5-bp155.2.3.1
1.23.5-bp155.2.3.1
syncthing
openSUSE:Tumbleweed
before 1.23.5-1.1
1.23.5-1.1

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE 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

Show 10 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open