CVE-2023-38686Critical· 9.3▾ MidnightSydent does not verify email server certificates
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 51.2 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Sep 12.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.3%
If configured to send emails using TLS, Sydent does not verify SMTP servers' certificates. This makes Sydent's emails vulnerable to interception via a man-in-the-middle (MITM) attack. Attackers with privileged access to the network can intercept room invitations and address confirmation emails.
CVSS 3.1 overall score: 3.3 - AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N/CR:L/IR:L/AR:X/MAV:A/MAC:H/MPR:N/MUI:N/MS:C/MC:L/MI:L/MA:N
Reported by Martin Schobert, Pentagrid AG.
Sydent can be configured to send emails over a TLS-encrypted socket by setting
email:
tlsmode: "TLS" # or the legacy value "SSL"
in its config file. Alternatively it can be configured to use Opportunistic TLS by setting
email:
tlsmode: "STARTTLS"
In both situations, Sydent will encrypt its communication with the SMTP server when sending emails. In affected versions, Sydent will not verify the destination server's certificate.
Sydent sends email for two purposes:
Therefore, attackers capable of running a MITM attack can
This is patched in Sydent 2.5.6, see PR https://github.com/matrix-org/sydent/pull/574.
When patching, make sure that Sydent trusts the certificate of the server it is connecting to. This should happen automatically when using properly issued certificates. If you are using self-signed certificates, make sure to copy your Certification Authority certificate, or your self signed certificate if using only one, to the trust store of your operating system.
One can ensure Sydent's emails fail to send by setting the configured SMTP server to a loopback or non-routable address under your control which does not have a listening SMTP server. For example:
email:
smtphost: "localhost" # Assuming there is no SMTP server listening on localhost
smtp module safely.If you have any questions or comments about this advisory, e-mail us at [email protected].
matrix-sydent < 2.5.6Upgrade to a patched release:
matrix-sydent 2.5.6Connected by shared product, vendor, weakness, or advisory.
CVE-2021-29430High· 7.5Sydent vulnerable to denial of service attack via memory exhaustion
CVE-2021-29433Medium· 4.3Sydent DoS (via resource exhaustion) due to improper input validation
CVE-2021-29431High· 7.7SSRF in Sydent due to missing validation of hostnames
CVE-2021-29432Medium· 5.3Malicious users could abuse Sydent to control the content of invitation emails
CVE-2019-11842High· 7.5matrix-sydent and matrix-synapse Use Cryptographically Weak PRNG
CVE-2019-11340Medium· 5.9Matrix Sydent mishandles emails