Skip to content

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

Moderate severity GitHub Reviewed Published Oct 14, 2026 in rustls/rustls • Updated Oct 27, 2026

Package

cargo rustls (Rust)

Affected versions

< 0.23.46
>= 0.24.0-dev.1, < 0.24.0-dev.2

Patched versions

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

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] for the disclosure.

References

@ctz ctz published to rustls/rustls Oct 14, 2026
Published to the GitHub Advisory Database Oct 27, 2026
Reviewed Oct 27, 2026
Last updated Oct 27, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N

EPSS score

Weaknesses

Improper Removal of Sensitive Information Before Storage or Transfer

The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-c8m5-c952-6cm4

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.