Every CVE Search/ Get API key

CVE-2021-21404

Crash due to malformed relay protocol message

7.5 HighFix available

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.97%Up 0.9 points since Apr 14, 2021
90%50%10%1%

What each source reports

CVE List Score used 7.5

Crash due to malformed relay protocol message

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-20
Updated
2026-11-02
EUVDEUVD-2021-1226 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
EUVD-2021-1226
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-x462-89pf-6r5h 7.5

Crash due to malformed relay protocol message

Impact

  1. syncthing can be caused to crash and exit if sent a malformed relay protocol message message with a negative length field.

  2. The relay server strelaysrv can be caused to crash and exit if sent a malformed relay protocol message with a negative length field.

At no point is sensitive data exposed or liable to be altered due to this issue. Sensitive data is never exposed to relay operators. Syncthing itself would need to be lured to connect to a malicious relay server in order to exploit the issue.

Patches

Fixed in version 1.15.0.

Workarounds

  1. No known workaround for strelaysrv.

  2. syncthing can be configured to not use relays, or to only use specific, trusted relays. If Syncthing is used in a closed environment or with relaying disabled, i.e., it does not communicate with unknown relays, Syncthing is not vulnerable.

For more information

If you have any questions or comments about this advisory, please discuss it on the forum.

Thanks to Wojciech Paciorek for discovering and reporting this issue.

Record
GHSA-x462-89pf-6r5h
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-20
Updated
2026-11-02
NVD 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-20
Updated
2026-11-02
OSVALPINE-CVE-2021-21404 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
ALPINE-CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
OSV 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 8 moreShow less
OSVDEBIAN-CVE-2021-21404 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
DEBIAN-CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-x462-89pf-6r5h 7.5

Crash due to malformed relay protocol message

Impact

  1. syncthing can be caused to crash and exit if sent a malformed relay protocol message message with a negative length field.

  2. The relay server strelaysrv can be caused to crash and exit if sent a malformed relay protocol message with a negative length field.

At no point is sensitive data exposed or liable to be altered due to this issue. Sensitive data is never exposed to relay operators. Syncthing itself would need to be lured to connect to a malicious relay server in order to exploit the issue.

Patches

Fixed in version 1.15.0.

Workarounds

  1. No known workaround for strelaysrv.

  2. syncthing can be configured to not use relays, or to only use specific, trusted relays. If Syncthing is used in a closed environment or with relaying disabled, i.e., it does not communicate with unknown relays, Syncthing is not vulnerable.

For more information

If you have any questions or comments about this advisory, please discuss it on the forum.

Thanks to Wojciech Paciorek for discovering and reporting this issue.

Record
GHSA-x462-89pf-6r5h
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVUBUNTU-CVE-2021-21404 7.5

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
UBUNTU-CVE-2021-21404
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBIT-syncthing-2021-21404 No score

Crash due to malformed relay protocol message

Syncthing is a continuous file synchronization program. In Syncthing before version 1.15.0, the relay server strelaysrv can be caused to crash and exit by sending a relay message with a negative length field. Similarly, Syncthing itself can crash for the same reason if given a malformed message from a malicious relay server when attempting to join the relay. Relay joins are essentially random (from a subset of low latency relays) and Syncthing will by default restart when crashing, at which point it's likely to pick another non-malicious relay. This flaw is fixed in version 1.15.0.

Record
BIT-syncthing-2021-21404
Updated
2026-11-02
OSVGO-2022-0888 No score

Crash due to malformed relay protocol message in github.com/syncthing/syncthing

Crash due to malformed relay protocol message in github.com/syncthing/syncthing

Record
GO-2022-0888
Updated
2026-11-02
OSVopenSUSE-SU-2021:0688-1 No score

Security update for syncthing

This update for syncthing fixes the following issues:

Update to 1.15.0/1.15.1

  • This release fixes a vulnerability where Syncthing and the relay server can crash due to malformed relay protocol messages (CVE-2021-21404); see GHSA-x462-89pf-6r5h. (boo#1184428)
  • This release updates the CLI to use subcommands and adds the subcommands cli (previously standalone stcli utility) and decrypt (for offline verifying and decrypting encrypted folders).
  • With this release we invite everyone to test the 'untrusted (encrypted) devices' feature. You should not use it yet on important production data. Thus UI controls are hidden behind a feature flag. For more information, visit: https://forum.syncthing.net/t/testing-untrusted-encrypted-devices/16470

Update to 1.14.0

  • This release adds configurable device and folder defaults.
  • The output format of the /rest/db/browse endpoint has changed.

update to 1.13.1:

update to 1.12.1:

  • Invalid names are allowed and 'auto accepted' in folder root path on Windows
  • Sometimes indexes for some folders aren't sent after starting Syncthing
  • [Untrusted] Remove Unexpected Items leaves things behind
  • Wrong theme on selection
  • Quic spamming address resolving
  • Deleted locally changed items still shown as locally changed
  • Allow specifying remote expected web UI port which would generate a href somewhere
  • Ignore fsync errors when saving ignore files

Update to 1.12.0

  • The 1.12.0 release

    • adds a new config REST API.
  • The 1.11.0 release

    • adds the sendFullIndexOnUpgrade option to control whether all index data is resent when an upgrade is detected, equivalent to starting Syncthing with --reset-deltas. This (sendFullIndexOnUpgrade=true) used to be the behavior in previous versions, but is mainly useful as a troubleshooting step and causes high database churn. The new default is false.
  • Update to 1.10.0

    • This release adds the config option announceLANAddresses to enable (the default) or disable announcing private (RFC1918) LAN IP addresses to global discovery.
  • Update to 1.9.0

  • Fix Leap build by requiring at least Go 1.14

  • Prevent the build system to download Go modules which would require an internet connection during the build

  • Update to 1.8.0

    • The 1.8.0 release
      • adds the experimental copyRangeMethod config on folders, for use on filesystems with copy-on-write support. Please see https://docs.syncthing.net/advanced/folder-copyrangemethod.html for details.
      • adds TCP hole punching, used to establish high performance TCP connections in certain NAT scenarios where only relay or QUIC connections could be used previously.
      • adds a configuration to file versioning for how often to run cleanup. This defaults to once an hour, but is configurable from very frequently to never.
    • The 1.7.0 release performs a database migration to optimize for clusters with many devices.
    • The 1.6.0 release performs a database schema migration, and adds the BlockPullOrder, DisableFsync and MaxConcurrentWrites folder options to the configuration schema. The LocalChangeDetected event no longer has the action set to added for new files, instead showing modified for all local file changes.
    • The 1.5.0 release…
Record
openSUSE-SU-2021:0688-1
Updated
2026-11-02
OSVopenSUSE-SU-2021:0713-1 No score

Security update for syncthing

This update for syncthing fixes the following issues:

Update to 1.15.0/1.15.1

  • This release fixes a vulnerability where Syncthing and the relay server can crash due to malformed relay protocol messages (CVE-2021-21404); see GHSA-x462-89pf-6r5h. (boo#1184428)
  • This release updates the CLI to use subcommands and adds the subcommands cli (previously standalone stcli utility) and decrypt (for offline verifying and decrypting encrypted folders).
  • With this release we invite everyone to test the 'untrusted (encrypted) devices' feature. You should not use it yet on important production data. Thus UI controls are hidden behind a feature flag. For more information, visit: https://forum.syncthing.net/t/testing-untrusted-encrypted-devices/16470

Update to 1.14.0

  • This release adds configurable device and folder defaults.
  • The output format of the /rest/db/browse endpoint has changed.

update to 1.13.1:

update to 1.12.1:

  • Invalid names are allowed and 'auto accepted' in folder root path on Windows
  • Sometimes indexes for some folders aren't sent after starting Syncthing
  • [Untrusted] Remove Unexpected Items leaves things behind
  • Wrong theme on selection
  • Quic spamming address resolving
  • Deleted locally changed items still shown as locally changed
  • Allow specifying remote expected web UI port which would generate a href somewhere
  • Ignore fsync errors when saving ignore files

Update to 1.12.0

  • The 1.12.0 release

    • adds a new config REST API.
  • The 1.11.0 release

    • adds the sendFullIndexOnUpgrade option to control whether all index data is resent when an upgrade is detected, equivalent to starting Syncthing with --reset-deltas. This (sendFullIndexOnUpgrade=true) used to be the behavior in previous versions, but is mainly useful as a troubleshooting step and causes high database churn. The new default is false.
  • Update to 1.10.0

    • This release adds the config option announceLANAddresses to enable (the default) or disable announcing private (RFC1918) LAN IP addresses to global discovery.
  • Update to 1.9.0

  • Fix Leap build by requiring at least Go 1.14

  • Prevent the build system to download Go modules which would require an internet connection during the build

  • Update to 1.8.0

    • The 1.8.0 release
      • adds the experimental copyRangeMethod config on folders, for use on filesystems with copy-on-write support. Please see https://docs.syncthing.net/advanced/folder-copyrangemethod.html for details.
      • adds TCP hole punching, used to establish high performance TCP connections in certain NAT scenarios where only relay or QUIC connections could be used previously.
      • adds a configuration to file versioning for how often to run cleanup. This defaults to once an hour, but is configurable from very frequently to never.
    • The 1.7.0 release performs a database migration to optimize for clusters with many devices.
    • The 1.6.0 release performs a database schema migration, and adds the BlockPullOrder, DisableFsync and MaxConcurrentWrites folder options to the configuration schema. The LocalChangeDetected event no longer has the action set to added for new files, instead showing modified for all local file changes.
    • The 1.5.0 release…
Record
openSUSE-SU-2021:0713-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11417-1 No score

syncthing-1.18.2-2.1 on GA media

These are all security issues fixed in the syncthing-1.18.2-2.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11417-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/syncthing/syncthing
Go
before 1.15.0
1.15.0
syncthing
Alpine:v3.13
before 1.12.1-r1
1.12.1-r1
syncthing
Alpine:v3.14
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.15
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.16
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.17
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.18
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.19
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.20
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.21
before 1.15.1-r0
1.15.1-r0
Show 17 moreShow less
Affected packages
PackageAffectedFixed
syncthing
Alpine:v3.22
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.23
before 1.15.1-r0
1.15.1-r0
syncthing
Alpine:v3.24
before 1.15.1-r0
1.15.1-r0
syncthing
Bitnami
before 1.15.0
1.15.0
syncthing
Debian:12
before 1.12.1~ds1-3
1.12.1~ds1-3
syncthing
Debian:13
before 1.12.1~ds1-3
1.12.1~ds1-3
syncthing
Debian:14
before 1.12.1~ds1-3
1.12.1~ds1-3
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
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
openSUSE:Leap 15.2
before 1.15.1-lp152.2.3.1
1.15.1-lp152.2.3.1
syncthing
SUSE:Package Hub 15 SP2
before 1.15.1-bp152.2.3.1
1.15.1-bp152.2.3.1
syncthing
openSUSE:Tumbleweed
before 1.18.2-2.1
1.18.2-2.1

History

History
RecordedChangedSources
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-21404 is a high vulnerability (CVSS 7.5) in Syncthing, published April 6, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.97%, the 80th percentile. Fixed in github.com/syncthing/syncthing 1.15.0.

References

Show 8 moreShow less
This page doesn't list everything

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

MoveEnter Open