Vulnerability · Published Aug 4, 2023 · Assigned by GitHub_M
CVE-2023-38686Sydent does not verify email server certificates
Critical 9.3
In plain English
A critical-severity improper certificate validation in sydent from matrix-org. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | matrix-sydent | 2.5.6 | GHSA-p6hw-wm59-3g5g |
| PyPI | matrix-sydent | 2.5.6 | PYSEC-2023-139 |
| Ubuntu:22.04:LTS | matrix-sydent | no fix listed | UBUNTU-CVE-2023-38686 |
| Ubuntu:24.04:LTS | matrix-sydent | no fix listed | UBUNTU-CVE-2023-38686 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| matrix-org | sydent | < 2.5.6 |
Weakness: CWE-295 · Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
References
- https://github.com/matrix-org/sydent/security/advisories/GHSA-p6hw-wm59-3g5g x_refsource_CONFIRM
- https://github.com/python/cpython/issues/91826 x_refsource_MISC
- https://github.com/matrix-org/sydent/pull/574 x_refsource_MISC
- https://github.com/matrix-org/sydent/commit/1cd748307c6b168b66154e6c4db715d4b9551261 x_refsource_MISC
- https://docs.python.org/3/library/ssl.html?highlight=ssl#security-considerations x_refsource_MISC
- https://github.com/matrix-org/sydent/releases/tag/v2.5.6 x_refsource_MISC
- https://peps.python.org/pep-0476/ x_refsource_MISC