SYNCTHING-SECURITY(7)              Syncthing             SYNCTHING-SECURITY(7)



NNAAMMEE
       syncthing-security - Security Principles

       Security is one of the primary project goals. This means that it should
       not be possible for an attacker to join a  cluster  uninvited,  and  it
       should  not be possible to extract private information from intercepted
       traffic. Currently this is implemented as follows.

       All device to device traffic is protected by TLS. To prevent  uninvited
       devices  from  joining  a  cluster, the certificate fingerprint of each
       device is compared to a preset list of acceptable devices at connection
       establishment.  The  fingerprint is computed as the SHA-256 hash of the
       certificate and displayed in a human-friendly encoding,  called  Device
       ID.

       Incoming  requests  for  file  data are verified to the extent that the
       requested file name must exist in the local index and the global model.

       For information about ensuring you are running the code you  think  you
       are and for reporting security vulnerabilities, please see the official
       _s_e_c_u_r_i_t_y _p_a_g_e <hhttttppss::////ssyynncctthhiinngg..nneett//sseeccuurriittyy>.

IINNFFOORRMMAATTIIOONN LLEEAAKKAAGGEE
   GGlloobbaall DDiissccoovveerryy
       When global discovery is enabled, Syncthing sends an announcement every
       30 minutes to the global discovery servers so that they can keep a map‐
       ping between your device ID and external IP. The  announcement  contain
       the  device  ID  and  listening port(s). Also, when connecting to other
       devices that have not been seen on the local network, a query  is  sent
       to  the  global  discovery  servers  containing  the  device  ID of the
       requested device. The connection to the discovery server  is  encrypted
       using TLS and the discovery server certificate is verified, so the con‐
       tents of the query should be considered private between the device  and
       the  discovery  server.  The  discovery servers are currently hosted by
       _@_c_a_l_m_h <hhttttppss::////ggiitthhuubb..ccoomm//ccaallmmhh>. Global discovery defaults to oonn.

       When turned off, devices with dynamic addresses not on the  local  net‐
       work cannot be found and connected to.

       An  eavesdropper  on the Internet can deduce which machines are running
       Syncthing with global discovery enabled, and what their device IDs are.

       The operator of the discovery server can map arbitrary device addresses
       to IP addresses, and deduce which devices are connected to each other.

       If  a  different global discovery server is configured, no data is sent
       to the default global discovery servers.

   LLooccaall DDiissccoovveerryy
       When local discovery is enabled, Syncthing sends broadcast  (IPv4)  and
       multicast  (IPv6)  packets  to  the local network every 30 seconds. The
       packets contain the device  ID  and  listening  port.  Local  discovery
       defaults to oonn.

       An eavesdropper on the local network can deduce which machines are run‐
       ning Syncthing with local discovery enabled, and what their device  IDs
       are.

       When  turned  off,  devices with dynamic addresses on the local network
       cannot be found and connected to.

   UUppggrraaddee CChheecckkss
       When automatic upgrades are enabled, Syncthing checks for a new version
       at  startup  and  then  once  every  twelve  hours. This is by an HTTPS
       request to the download site for releases, currently hosted  by  _@_c_a_l_m_h
       <hhttttppss::////ggiitthhuubb..ccoomm//ccaallmmhh>.   Automatic  upgrades default to oonn (unless
       Syncthing was compiled with upgrades disabled).

       Even when automatic upgrades are  disabled  in  the  configuration,  an
       upgrade check as above is done when the GUI is loaded, in order to show
       the âUpgrade to â¦â button when necessary. This can be disabled only by
       compiling Syncthing with upgrades disabled.

       The  actual  download,  should  an  upgrade  be available, is done from
       GGiittHHuubb, thus exposing the user to them.

       The upgrade check (or download) requests _d_o _n_o_t contain  any  identifi‐
       able information about the user or device.

   UUssaaggee RReeppoorrttiinngg
       When  usage  reporting  is  enabled,  Syncthing  reports  usage data at
       startup and then every 24 hours. The report is sent as an HTTPS POST to
       the    usage    reporting    server,   currently   hosted   by   _@_c_a_l_m_h
       <hhttttppss::////ggiitthhuubb..ccoomm//ccaallmmhh>. The contents of the  usage  report  can  be
       seen behind the âPreviewâ link in settings. Usage reporting defaults to
       ooffff but the GUI will ask once about  enabling  it,  shortly  after  the
       first install.

       The  reported  data is protected from eavesdroppers, but the connection
       to the usage reporting server itself may expose the client  as  running
       Syncthing.

   SSyynncc CCoonnnneeccttiioonnss ((BBEEPP))
       Sync  connections  are  attempted  to  all configured devices, when the
       address is possible to resolve. The sync connection is based on TLS 1.2
       or  TLS  1.3.  The TLS certificates can be obtained by an eavesdropper,
       although it is more difficult to do so in TLS 1.3. This means that  the
       contents  of  the  certificate  are visible, which includes certificate
       Common Name (by default ssyynncctthhiinngg).

       An eavesdropper can deduce that this  is  a  Syncthing  connection  and
       under  certain circumstances calculate the device IDs involved based on
       the hashes of the sent certificates.

       Likewise, if the sync port  (default  22000)  is  accessible  from  the
       internet, a port scanner may discover it, attempt a TLS negotiation and
       thus obtain the device certificate. This provides the same  information
       as in the eavesdropper case.

   RReellaayy CCoonnnneeccttiioonnss
       When  relaying  is  enabled,  Syncthing will look up the pool of public
       relays and establish a connection to one of them (the best, based on an
       internal  heuristic). The selected relay server will learn the connect‐
       ing deviceâs device ID. Relay servers can be run by aannyyoonnee iinn tthhee  ggeenn‐‐
       eerraall  ppuubblliicc.   Relaying defaults to oonn. Syncthing can be configured to
       disable relaying, or only use specific relays.

       If a relay connections is required between two devices, the relay  will
       learn the other deviceâs device ID as well.

       Any  data  exchanged  between the two devices is encrypted as usual and
       not subject to inspection by the relay.

   WWeebb GGUUII
       If the web GUI is accessible, it exposes the device  as  running  Sync‐
       thing.  The  web  GUI  defaults  to being reachable from the llooccaall hhoosstt
       oonnllyy.

IINN SSHHOORRTT
       Parties doing surveillance on your network (whether that  be  corporate
       IT,  the  NSA  or  someone else) will be able to see that you use Sync‐
       thing, and your device IDs _a_r_e _O_K _t_o _s_h_a_r_e  _a_n_y_w_a_y  <hhttttppss::////ddooccss..ssyynncc‐‐
       tthhiinngg..nneett//uusseerrss//ffaaqq..hhttmmll##sshhoouulldd--ii--kkeeeepp--mmyy--ddeevviiccee--iiddss--sseeccrreett>,  but  the
       actual transmitted data is protected as well as we  can.  Knowing  your
       device ID can expose your IP address, using global discovery.

PPRROOTTEECCTTIINNGG YYOOUURR SSYYNNCCTTHHIINNGG KKEEYYSS AANNDD IIDDEENNTTIITTYY
       Anyone  who  can  access the Syncthing TLS keys and config file on your
       device can impersonate your device, connect to  your  peers,  and  then
       have  access  to your synced files. Here are some general principles to
       protect your files:

       1. If a device of yours is lost, make sure to revoke  its  access  from
          your other devices.

       2. If  youâre  syncing  confidential data on an encrypted disk to guard
          against device theft, put the Syncthing config folder  on  the  same
          encrypted  disk  to  avoid  leaking keys and metadata. Or, use whole
          disk encryption.

AAUUTTHHOORR
       The Syncthing Authors

CCOOPPYYRRIIGGHHTT
       2014-2019, The Syncthing Authors



v1.19.2                          Apr 05, 2022            SYNCTHING-SECURITY(7)
