Skip to main content
← All vulnerabilities
GHSA-C8M5-C952-6CM4RUSTSEC-2026-0346

Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs

Published
Last modified
published
Not listed in CISA KEV
Medium (ghsa)
Fix
Fixed in 0.23.46, 0.24.0-dev.2
None on Exploit-DB, Metasploit or GitHub

Summary

Rustls, the Rust TLS library, is affected when its TLS 1.2 and TLS 1.3 client session values are formatted with the Debug trait, which can reveal the session's master secret or resumption key. This is a risk mainly for applications with custom session stores that write these values to logs, since anyone who can read those logs could obtain the keys needed to decrypt the affected TLS sessions.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

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. 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 OutboundDisclosures@openai.com for the disclosure.

Timeline

  1. Advisory published
  2. Record last updated
  3. First seen by cve.now

Affected versions

  • rustlscrates.io

    fixed in 0.23.46

  • rustlscrates.io

    From 0.24.0-dev.1 · fixed in 0.24.0-dev.2

References 8

GitHub · rustls/rustls

rustsec.org