CVE-2023-38686 Sydent does not verify email server certificates
Sydent fails to verify SMTP certificates when TLS is enabled, allowing network attackers to intercept emails via man-in-the-middle attacks.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-38686?
CVE-2023-38686 is a critical vulnerability in matrix-org sydent, published on 4 Aug 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Sydent is an identity server for the Matrix communications protocol. Prior to version 2.5.6, 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. This is patched in Sydent 2.5.6. 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. Those who use self-signed certificates should make sure to copy their Certification Authority certificate, or their self signed certificate if using only one, to the trust store of your operating system. As a workaround, one can ensure Sydent's emails fail to send by setting the configured SMTP server to a loopback or non-routable address under one's control which does not have a listening SMTP server.
Weakness: CWE-295
Which versions are affected by CVE-2023-38686?
3 open source packages ship an affected version, including matrix-sydent. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
matrix-sydent PyPI | All versions | 2.5.6 |
matrix-sydent PyPI | All versions | 2.5.6 |
matrix-sydent PyPI | All versions | 2.5.6 |
Products include Matrix Sydent.
How do I fix CVE-2023-38686?
Upgrade matrix-sydent to 2.5.6 or later.
Is CVE-2023-38686 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-38686 exists.
Other vulnerabilities in matrix-org sydent
- CVE-2021-29431 SSRF in Sydent due to missing validation of hostnames
- CVE-2021-29430 Denial of service attack via memory exhaustion
- CVE-2019-11842 matrix-sydent and matrix-synapse Use Cryptographically Weak PRNG
- CVE-2019-11340 Matrix Sydent mishandles emails
- CVE-2021-29432 Malicious users could control the content of invitation emails
Sources
Also known as GHSA-p6hw-wm59-3g5g, PYSEC-2023-139, UBUNTU-CVE-2023-38686.