CVE-2023-38686 Sydent does not verify email server certificates

Critical 9.3 Published Updated

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.

PackageAffectedFixed in
matrix-sydent PyPIAll versions2.5.6
matrix-sydent PyPIAll versions2.5.6
matrix-sydent PyPIAll versions2.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.

Sources

Also known as GHSA-p6hw-wm59-3g5g, PYSEC-2023-139, UBUNTU-CVE-2023-38686.

Is CVE-2023-38686 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free