CVE-2021-21404
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.
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
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 High
CVSS: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 High
CVSS: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
-
syncthingcan be caused to crash and exit if sent a malformed relay protocol message message with a negative length field. -
The relay server
strelaysrvcan 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
-
No known workaround for
strelaysrv. -
syncthingcan 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 High
CVSS: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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV: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 High
CVSS: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 High
CVSS: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 High
CVSS: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
-
syncthingcan be caused to crash and exit if sent a malformed relay protocol message message with a negative length field. -
The relay server
strelaysrvcan 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
-
No known workaround for
strelaysrv. -
syncthingcan 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 High
CVSS: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 High
CVSS: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:
- This release adds configuration options for min/max connections (see https://docs.syncthing.net/advanced/option-connection-limits.html) and moves the storage of pending devices/folders from the config to the database (see https://docs.syncthing.net/dev/rest.html#cluster-endpoints).
- Bugfixes
- Official builds of v1.13.0 come with the Tech Ui, which is impossible to switch back from
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
- This release adds the advanced folder option caseSensitiveFS (https://docs.syncthing.net/advanced/folder-caseSensitiveFS.html) to disable the new safe handling of case insensitive filesystems.
-
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…
- The 1.8.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:
- This release adds configuration options for min/max connections (see https://docs.syncthing.net/advanced/option-connection-limits.html) and moves the storage of pending devices/folders from the config to the database (see https://docs.syncthing.net/dev/rest.html#cluster-endpoints).
- Bugfixes
- Official builds of v1.13.0 come with the Tech Ui, which is impossible to switch back from
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
- This release adds the advanced folder option caseSensitiveFS (https://docs.syncthing.net/advanced/folder-caseSensitiveFS.html) to disable the new safe handling of case insensitive filesystems.
-
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…
- The 1.8.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
| Package | Affected | Fixed |
|---|---|---|
github.com/syncthing/syncthingGo |
before 1.15.0 | 1.15.0 |
syncthingAlpine:v3.13 |
before 1.12.1-r1 | 1.12.1-r1 |
syncthingAlpine:v3.14 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.15 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.16 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.17 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.18 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.19 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.20 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.21 |
before 1.15.1-r0 | 1.15.1-r0 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
syncthingAlpine:v3.22 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.23 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingAlpine:v3.24 |
before 1.15.1-r0 | 1.15.1-r0 |
syncthingBitnami |
before 1.15.0 | 1.15.0 |
syncthingDebian:12 |
before 1.12.1~ds1-3 | 1.12.1~ds1-3 |
syncthingDebian:13 |
before 1.12.1~ds1-3 | 1.12.1~ds1-3 |
syncthingDebian:14 |
before 1.12.1~ds1-3 | 1.12.1~ds1-3 |
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 |
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 |
syncthingopenSUSE:Leap 15.2 |
before 1.15.1-lp152.2.3.1 | 1.15.1-lp152.2.3.1 |
syncthingSUSE:Package Hub 15 SP2 |
before 1.15.1-bp152.2.3.1 | 1.15.1-bp152.2.3.1 |
syncthingopenSUSE:Tumbleweed |
before 1.18.2-2.1 | 1.18.2-2.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| 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-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
github.com/syncthing/syncthing/security/advisories/GHSA-x462-89pf-6r5h
pkg.go.dev/github.com/syncthing/syncthing
github.com/syncthing/syncthing/commit/fb4fdaf4c0a79c22cad000c42ac1394e3ccb6a97
github.com/syncthing/syncthing/releases/tag/v1.15.0
nvd.nist.gov/vuln/detail/CVE-2021-21404
github.com/advisories/GHSA-x462-89pf-6r5h
Show 8 moreShow less
security.alpinelinux.org/vuln/CVE-2021-21404
security-tracker.debian.org/tracker/CVE-2021-21404
ubuntu.com/security/CVE-2021-21404
cve.org/CVERecord?id=CVE-2021-21404
lists.opensuse.org/archives/list/[email protected]/thread/UIFNGMDOIZ3DQYLTSKXQFICFKTHWOLKM
bugzilla.suse.com/1184428
suse.com/security/cve/CVE-2021-21404
lists.opensuse.org/archives/list/[email protected]/thread/NVATCVHED4EFGAZ3YBJASSPIHZFG5AC7
Left out here: the rest of 2 source descriptions. The JSON record has them.