{"id":"GHSA-c8m5-c952-6cm4","kind":"vulnerability","aliases":["GHSA-c8m5-c952-6cm4"],"related":[],"title":"Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs","description":"### Summary\n\nFormatting 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.\n\n### Details\n\nDerived 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).\n\n### Proof of concept\n\nCustom `ClientSessionStore` implementations could leak secret data by using the provided `Tls12ClientSessionValue` or `Tls13ClientSessionValue` in a way that triggers its implementation of the `Debug` trait.\n\n### Impact\n\nSuch store implementations could leak the master secret for the TLS connection.\n\n### Acknowledgement\nThanks to OpenAI [OutboundDisclosures@openai.com](mailto:OutboundDisclosures@openai.com) for the disclosure.","summary":"Formatting a Rustls client session value with Debug prints its TLS 1.2 master secret or TLS 1.3 resumption PSK. A custom session store that logs these values can leak keys to anyone who reads the logs.","severity":"medium","cvss":4.0,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"rustls","fixed":["0.23.46"],"affected":"< 0.23.46","ecosystem":"cargo"},{"name":"rustls","fixed":["0.24.0-dev.2"],"affected":">= 0.24.0-dev.1, < 0.24.0-dev.2","ecosystem":"cargo"}],"ecosystems":["cargo"],"tags":["cargo","cwe-212","package","rust","rustls"],"not_affected_if":["default-config","no-custom-session-store"],"how_to_check":"- Run `cargo tree -i rustls` and note the resolved version\n- Search your code for a custom `ClientSessionStore` implementation that logs or Debug-formats `Tls12ClientSessionValue` or `Tls13ClientSessionValue`","fix":"- Upgrade rustls to `0.23.46` or later on the 0.23 line\n- Upgrade to `0.24.0-dev.2` or later if you use the 0.24 dev line\n- Stop logging session store values with Debug until upgraded","status":"open","published_at":"2026-10-27T16:08:47+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","triaged_at":"2026-10-27T16:10:54+00:00","updated_at":"2026-10-27T16:10:54+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-27T16:10:54Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade rustls to `0.23.46` or later on the 0.23 line\n- Upgrade to `0.24.0-dev.2` or later if you use the 0.24 dev line\n- Stop logging session store values with Debug until upgraded","reach":"local","title":"Rustls: session Debug output can expose TLS secrets in logs","impact":"medium","summary":"Formatting a Rustls client session value with Debug prints its TLS 1.2 master secret or TLS 1.3 resumption PSK. A custom session store that logs these values can leak keys to anyone who reads the logs.","category":"package","nicknames":[],"who_cares":["rust","rustls","cargo"],"confidence":0.8,"needs_auth":"no","worst_case":"Master secrets or resumption PSKs leak into readable application logs","analyst_note":"","how_to_check":"- Run `cargo tree -i rustls` and note the resolved version\n- Search your code for a custom `ClientSessionStore` implementation that logs or Debug-formats `Tls12ClientSessionValue` or `Tls13ClientSessionValue`","needs_analyst":false,"not_affected_if":["default-config","no-custom-session-store"],"who_is_affected":"Only applications that implement a custom ClientSessionStore and print its session values with Debug or log them. Ordinary connections and the built-in cache keep secrets redacted, so most rustls users are not exposed. Teams running custom session stores with logging should upgrade.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000644,"input_tokens":3702,"output_tokens":547,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-212':26B '/rustls/rustls/blob/99f2358cae2954837dbb866faf6727de75489ab9/security.md#boundary-public-api).':149C '1.2':41B,77C '1.3':46B,82C '6cm4':16A,21A 'acknowledg':191C 'alreadi':117C 'anyon':61B 'bear':133C 'built':105C 'built-in':104C 'c8m5':14A,19A 'c952':15A,20A 'cach':107C 'cargo':24B 'client':33B,69C 'clientsessionstor':154C 'concept':152C 'conflict':136C 'connect':102C,190C 'could':156C,182C 'custom':50B,86C,153C 'cwe':25B 'data':159C 'debug':3A,37B,73C,176C 'deriv':125C 'detail':124C 'diagnost':108C 'disclos':94C 'disclosur':200C 'explicit':141C 'expos':5A,74C 'field':134C 'format':4A,30B,67C 'formatt':126C 'ghsa':13A,18A 'ghsa-c8m5-c952-6cm4':12A,17A 'github.com':148C 'github.com/rustls/rustls/blob/99f2358cae2954837dbb866faf6727de75489ab9/security.md#boundary-public-api).':147C 'impact':178C 'implement':155C,173C,181C 'interfac':116C 'key':59B,95C,143C 'key-materi':142C 'leak':58B,157C,183C 'log':54B,65B,90C,100C 'mailto':196C 'master':7A,42B,78C,185C 'materi':144C 'openai':194C 'ordinari':101C 'outbounddisclosures@openai.com':195C,197C 'packag':27B 'polici':146C 'print':38B 'project':139C 'proof':150C 'provid':163C 'psk':48B,84C 'psks':11A 'read':63B 'reader':97C 'redact':110C,145C 'remain':109C 'resumpt':10A,47B,83C 'rust':28B 'rustl':1A,29B,32B 'rustls':22A,23A 'secret':8A,43B,79C,132C,158C,186C 'secret-bear':131C 'sensit':123C 'session':2A,34B,51B,70C,87C,114C,129C 'session-stor':113C 'store':52B,88C,115C,180C 'summari':66C 'thank':192C 'tls':6A,40B,45B,76C,81C,189C 'tls12clientsessionvalue':164C 'tls13clientsessionvalue':166C 'trait':177C 'travers':127C 'trigger':171C 'use':161C 'valu':35B,56B,71C,92C,121C 'warn':118C 'way':169C","nicknames":[],"mitigations":[],"who_affected":"Only applications that implement a custom ClientSessionStore and print its session values with Debug or log them. Ordinary connections and the built-in cache keep secrets redacted, so most rustls users are not exposed. Teams running custom session stores with logging should upgrade.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T16:08:47+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-c8m5-c952-6cm4","url":"https://github.com/advisories/GHSA-c8m5-c952-6cm4","severity":"medium","published_at":"2026-10-27T16:08:47+00:00","modified_at":"2026-10-27T16:08:48+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","fetched_at":"2026-10-27T16:10:07+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}