Every CVE Search/ Get API key

CVE-2023-38686

Sydent does not verify email server certificates

9.3 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Adjacent network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

0.27%Up 0.2 points since Aug 5, 2023
90%50%10%1%

What each source reports

CVE List Score used 9.3

Sydent does not verify email server certificates

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.

Record
CVE-2023-38686
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
EUVDEUVD-2023-0132 9.3

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.

Record
EUVD-2023-0132
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-p6hw-wm59-3g5g 9.3

Sydent does not verify email server certificates

Impact

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.

Details

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.

Vulnerability

Sydent sends email for two purposes:

  • to inform a third party that they have been invited to a Matrix room by their email address; and
  • to verify that a given Matrix user controls an email address.

Therefore, attackers capable of running a MITM attack can

  1. Intercept room invitations sent to an email address. The invitation includes
    • the room ID and its avatar, and
    • the inviter's username, displayname and their avatar, and
    • credentials for a guest Matrix account on the inviter's homeserver.
  2. Intercept address ownership confirmation emails. This would allow the attacker to falsely claim ownership of the indented recipient's Matrix account, if that account was permitted to log in using an email address and no other authentication factors.

Patches

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.

Workarounds

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

References

For more information

If you have any questions or comments about this advisory, e-mail us at [email protected].

Record
GHSA-p6hw-wm59-3g5g
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
NVD 9.3

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.

Record
CVE-2023-38686
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS 3.1
5.3 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-295
Updated
2026-11-02
OSV 9.3

Sydent does not verify email server certificates

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.

Record
CVE-2023-38686
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
OSVGHSA-p6hw-wm59-3g5g 9.3

Sydent does not verify email server certificates

Impact

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.

Details

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.

Vulnerability

Sydent sends email for two purposes:

  • to inform a third party that they have been invited to a Matrix room by their email address; and
  • to verify that a given Matrix user controls an email address.

Therefore, attackers capable of running a MITM attack can

  1. Intercept room invitations sent to an email address. The invitation includes
    • the room ID and its avatar, and
    • the inviter's username, displayname and their avatar, and
    • credentials for a guest Matrix account on the inviter's homeserver.
  2. Intercept address ownership confirmation emails. This would allow the attacker to falsely claim ownership of the indented recipient's Matrix account, if that account was permitted to log in using an email address and no other authentication factors.

Patches

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.

Workarounds

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

References

For more information

If you have any questions or comments about this advisory, e-mail us at [email protected].

Record
GHSA-p6hw-wm59-3g5g
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
OSVPYSEC-2023-139 5.3

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.

Record
PYSEC-2023-139
CVSS 3.1
5.3 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2023-38686 9.3

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.

Record
UBUNTU-CVE-2023-38686
CVSS 3.1
9.3 CriticalCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS 3.1
5.3 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
matrix-sydent
PyPI
before 2.5.6
2.5.6
matrix-sydent
PyPI
before 2.5.6, plus listed versions
2.0.02.0.12.1.02.2.02.3.0
Show 13 moreShow less
2.4.02.4.12.4.22.4.32.4.42.4.52.4.62.5.02.5.12.5.22.5.32.5.42.5.5
2.5.6
matrix-sydent
Ubuntu:22.04:LTS
All versions, plus listed versions
2.5.1-1
None known
matrix-sydent
Ubuntu:24.04:LTS
All versions, plus listed versions
2.5.1-1.12.5.1-1.1ubuntu0.1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2023-38686 is a critical vulnerability (CVSS 9.3) in Matrix Sydent, published July 31, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 18th percentile. Fixed in matrix-sydent 2.5.6.

References

Show 8 moreShow less
MoveEnter Open