7.5high
Crash due to malformed relay protocol message
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.97% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x462-89pf-6r5hBIT-SYNCTHING-2021-21404GO-2022-0888
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| syncthing syncthing | < 1.15.0, before 1.15.0 | CVE List, NVD |
| github.com/syncthing/syncthing (Go) | before 1.15.0 | GitHub Advisory Database, Go Vulnerability Database |
| syncthing (Bitnami) | before 1.15.0 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
Go Vulnerability Database
Crash due to malformed relay protocol message in github.com/syncthing/syncthing
NVD (es)
Syncthing es un programa de sincronización de archivos continua. En Syncthing versiones anteriores a 1.15.0, el servidor de retransmisión "strelaysrv" puede causar un bloqueo y salida mediante el envío de un mensaje de retransmisión con un campo de longitud negativa. De manera similar, Syncthing en sí puede presentar un fallo por la misma razón si recibe un mensaje malformado de un servidor de retransmisión malicioso al intentar unirse a la retransmisión. Las uniones de retransmisiones son esencialmente aleatorias (de un subconjunto de retransmisiones de baja latencia) y Syncthing se reiniciará por defecto cuando se bloquee, momento en el que es probable que elija otra retransmisión no maliciosa. Este fallo es corregido en la versión 1.15.0
References
| https://github.com/syncthing/syncthing/security/advisories/GHSA-x462-89pf-6r5h | advisory, third-party-advisory, web | |
| https://pkg.go.dev/github.com/syncthing/syncthing | advisory, product, third-party-advisory, web | |
| https://github.com/syncthing/syncthing/commit/fb4fdaf4c0a79c22cad000c42ac1394e3ccb6a97 | advisory, fix, patch, third-party-advisory, web | |
| https://github.com/syncthing/syncthing/releases/tag/v1.15.0 | advisory, release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-21404 | advisory, web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21404 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x462-89pf-6r5h changed 2026-07-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0888 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2021-21404 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-SYNCTHING-2021-21404 changed 2026-09-08 | Apache-2.0 |