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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.3
- **CVSS:** 9.3 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-295
- **Aliases:** GHSA-p6hw-wm59-3g5g, PYSEC-2023-139
- **Published:** 2023-07-31T22:03:44.000Z
- **Modified:** 2026-09-10T03:49:42.620Z

## Who should check

- Projects that depend on PyPI package matrix-sydent (\< 2.5.6)
- Anyone running matrix-org sydent \< 2.5.6

## 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 and fixed versions

- PyPI `matrix-sydent`: affected \< 2.5.6; fixed 2.5.6 (osv)
- matrix-org sydent: \< 2.5.6 (cvelist)

## Mitigation

- Upgrade matrix-sydent to 2.5.6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-38686. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-38686.md
Affected: matrix-sydent < 2.5.6
Fixed in: 2.5.6

Steps:
1. Search this machine and project for matrix-sydent (PyPI), matrix-org sydent: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-38686 being exploited?

There is no confirmed exploitation: CVE-2023-38686 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-38686?

Critical: CVSS 9.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-38686?

matrix-sydent \< 2.5.6.

### Is there a fix for CVE-2023-38686?

Yes. Fixed in 2.5.6. Upgrade matrix-sydent to 2.5.6 or later.

### How do I check if I'm affected by CVE-2023-38686?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/matrix-org/sydent/security/advisories/GHSA-p6hw-wm59-3g5g>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-38686>
- patch: <https://github.com/matrix-org/sydent/pull/574>
- patch: <https://github.com/matrix-org/sydent/commit/1cd748307c6b168b66154e6c4db715d4b9551261>
- other: <https://github.com/python/cpython/issues/91826>
- other: <https://docs.python.org/3/library/ssl.html?highlight=ssl#security-considerations>
- other: <https://github.com/matrix-org/sydent/releases/tag/v2.5.6>
- other: <https://peps.python.org/pep-0476/>
- other: <https://github.com/matrix-org/sydent>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/matrix-sydent/PYSEC-2023-139.yaml>
- other: <https://peps.python.org/pep-0476>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-38686>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-p6hw-wm59-3g5g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-139> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-38686> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-38686>
