Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs
Affects rustlsSource GCVE Database
CVSS 4.0 Medium : upgrade to 0.23.46 when convenient.
Data as of 27 Oct 2026, 17:42 UTC
- Patch
- Available – fixed in 0.23.46, 0.24.0-dev.2
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:NWhat to do
Upgrade rustls to 0.23.46; rustls to 0.24.0-dev.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| crates.iorustls | Affected
| Fixed in
|
| crates.iorustls | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and should be applied by upgrading rustls to version 0.23.46 or later, or to 0.24.0-dev.2 or later. Users should avoid logging or formatting client session values with Debug in custom ClientSessionStore implementations until patched. The vendor advisory explicitly warns that session-store values are sensitive and should be handled carefully.
Description
A vulnerability in rustls versions prior to 0.23.46 and between 0.24.0-dev.1 and 0.24.0-dev.2 allows the TLS master secret or TLS 1.3 resumption PSK to be exposed when formatting a client session value with the Debug trait. This can lead to leakage of sensitive key material if a custom ClientSessionStore logs these debug outputs. Built-in diagnostics do not expose these secrets, and the session-store interface warns about the sensitivity of these values.
References
- github.com/rustls/rustls/security/advisories/GHSA-c8m5-c952-6cm4 (opens in a new tab)
- github.com/rustls/rustls/pull/3299 (opens in a new tab)
- github.com/rustls/rustls/pull/3354 (opens in a new tab)
- github.com/rustls/rustls/commit/dcdb9464d376f45f42a94a5f837cda1506449f23 (opens in a new tab)
- github.com/rustls/rustls/commit/f5f7bf5078a7edcbd81a9e82a97f2bd14dc1c855 (opens in a new tab)
- github.com/rustls/rustls (opens in a new tab)
- github.com/rustls/rustls/releases/tag/v/0.23.46 (opens in a new tab)
- rustsec.org/advisories/RUSTSEC-2026-0346.html (opens in a new tab)