Rustls session Debug formatting exposes TLS master secrets
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
The Rustls crate from 0 before 0.23.46 and from 0.24.0-dev.1 before 0.24.0-dev.2 exposes secrets through the Debug formatting of client session values. Formatting a Tls12ClientSessionValue or Tls13ClientSessionValue prints the TLS 1.2 master secret or the TLS 1.3 resumption PSK. A custom session store that logs these values can disclose keys to anyone who reads the logs, tracked as CWE-212.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the GitHub advisory
### Summary Formatting a client session value with Debug exposes its TLS 1.2 master secret or TLS 1.3 resumption PSK. A custom session store that logs these values can disclose keys to readers of the logs. Ordinary connection and built-in cache diagnostics remain redacted, and the session-store interface already warns that its values are sensitive. ### Details Derived formatters traverse the session's secret-bearing fields. This conflicts with the project's explicit [key-material redaction policy](https://github.com/rustls/rustls/blob/99f2358cae2954837dbb866faf6727de75489ab9/SECURITY.md#boundary-public-api). ### Proof of concept Custom `ClientSessionStore` implementations could leak secret data by using the provided `Tls12ClientSessionValue` or `Tls13ClientSessionValue` in a way that triggers its implementation of the `Debug` trait. ### Impact Such store implementations could leak the master secret for the TLS connection. ### Acknowledgement Thanks to OpenAI [[email protected]](mailto:[email protected]) for the disclosure.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | rustls (crates.io) | before 0.23.46 | 0.23.46 | Patch available | GHSA-c8m5-c952-6cm4 |
| — | rustls (crates.io) | 0.24.0-dev.1 to before 0.24.0-dev.2 | 0.24.0-dev.2 | Patch available | GHSA-c8m5-c952-6cm4 |
- rustls (crates.io) Vendor— Affected before 0.23.46 Fixed in 0.23.46 Patch available GHSA-c8m5-c952-6cm4
- rustls (crates.io) Vendor— Affected 0.24.0-dev.1 to before 0.24.0-dev.2 Fixed in 0.24.0-dev.2 Patch available GHSA-c8m5-c952-6cm4
Remediation
Update rustls to 0.23.46 or 0.24.0-dev.2. The sources list no fixed version for rustls in other release lines.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · GHSA-c8m5-c952-6cm4 rustls (crates.io) Fixed in 0.23.46 Advisory →
- Fix · GHSA-c8m5-c952-6cm4 rustls (crates.io) Fixed in 0.24.0-dev.2 Advisory →
Timeline
- 2026-10-27 Threatist record created from GHSA-c8m5-c952-6cm4
References
Other 8
- https://github.com/rustls/rustls/security/advisories/GHSA-c8m5-c952-6cm4
- https://github.com/rustls/rustls/pull/3299
- https://github.com/rustls/rustls/pull/3354
- https://github.com/rustls/rustls/commit/dcdb9464d376f45f42a94a5f837cda1506449f23
- https://github.com/rustls/rustls/commit/f5f7bf5078a7edcbd81a9e82a97f2bd14dc1c855
- https://github.com/rustls/rustls
- https://github.com/rustls/rustls/releases/tag/v/0.23.46
- https://rustsec.org/advisories/RUSTSEC-2026-0346.html
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences