{"id":"CVE-2021-21404","aliases":["CVE-2021-21404","GHSA-x462-89pf-6r5h","BIT-SYNCTHING-2021-21404","GO-2022-0888"],"related":[],"kind":"vulnerability","state":"published","title":"Crash due to malformed relay protocol message","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n1. `syncthing` can be caused to crash and exit if sent a malformed relay\n   protocol message message with a negative length field.\n\n2. The relay server `strelaysrv` can be caused to crash and exit if sent\n   a malformed relay protocol message with a negative length field.\n\nAt no point is sensitive data exposed or liable to be altered due to this\nissue. Sensitive data is never exposed to relay operators. Syncthing itself\nwould need to be lured to connect to a malicious relay server in order to\nexploit the issue.\n\n### Patches\n\nFixed in version 1.15.0.\n\n### Workarounds\n\n1. No known workaround for `strelaysrv`.\n\n2. `syncthing` can be configured to not use relays, or to only use specific,\n   trusted relays. If Syncthing is used in a closed environment or with\n   relaying disabled, i.e., it does not communicate with unknown relays,\n   Syncthing is not vulnerable.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please discuss it [on the forum](https://forum.syncthing.net/).\n\nThanks to Wojciech Paciorek for discovering and reporting this issue.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Crash due to malformed relay protocol message in github.com/syncthing/syncthing","format":"markdown","source":"go"},{"lang":"es","text":"Syncthing es un programa de sincronización de archivos continua.&#xa0;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.&#xa0;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.&#xa0;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.&#xa0;Este fallo es corregido en la versión 1.15.0","source":"nvd"}],"published":"2021-04-06T20:00:15.000Z","modified":"2026-09-08T08:48:10.759Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 1.15.0","status":"affected"}],"vendor":"syncthing","product":"syncthing","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.0"}],"ecosystem":"Go","package":"github.com/syncthing/syncthing","purl":"pkg:golang/github.com/syncthing/syncthing","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.0"}],"ecosystem":"Go","package":"github.com/syncthing/syncthing","purl":"pkg:golang/github.com/syncthing/syncthing","source":"go"},{"ranges":[{"status":"affected","fixed":"1.15.0"}],"vendor":"syncthing","product":"syncthing","cpe":"cpe:2.3:a:syncthing:syncthing:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.0"}],"ecosystem":"Bitnami","package":"syncthing","purl":"pkg:bitnami/syncthing","source":"bitnami"}],"references":[{"url":"https://github.com/syncthing/syncthing/security/advisories/GHSA-x462-89pf-6r5h","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://pkg.go.dev/github.com/syncthing/syncthing","tags":["advisory","product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/syncthing/syncthing/commit/fb4fdaf4c0a79c22cad000c42ac1394e3ccb6a97","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/syncthing/syncthing/releases/tag/v1.15.0","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21404","tags":["advisory","web"],"sources":["ghsa","go","bitnami"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21404","url":"https://www.cve.org/CVERecord?id=CVE-2021-21404","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:16.158Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x462-89pf-6r5h","url":"https://github.com/advisories/GHSA-x462-89pf-6r5h","licence":"CC-BY-4.0","modified":"2026-07-08T06:30:05.046Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0888","url":"https://pkg.go.dev/vuln/GO-2022-0888","licence":"CC-BY-4.0","modified":"2026-03-03T04:52:24.853Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21404","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21404","licence":"Public domain","modified":"2026-06-17T03:35:30.003Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-SYNCTHING-2021-21404","url":"https://osv.dev/vulnerability/BIT-SYNCTHING-2021-21404","licence":"Apache-2.0","modified":"2026-09-08T08:48:10.759Z"}],"updatedAt":"2026-11-25T22:58:00.654Z","epss":{"score":0.0197,"percentile":0.8103,"date":"2026-12-01T12:00:22.000Z"}}