Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- The rating the maker of the software gives it. Shown when it differs from the CVSS level.What do these mean? →
- Medium (ghsa)
- Fix
- Fixed in 0.23.46, 0.24.0-dev.2
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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
- Advisory published
- Record last updated
- 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