Skip to content

← Actionable
Medium, CVSS 4.0amended

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

GHSA-c8m5-c952-6cm4

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (rustls 0.24.0-dev.2, 0.23.46), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io rustls

    Affected
    < 0.23.46>= 0.24.0-dev.1, < 0.24.0-dev.2
    Fixed in
    0.24.0-dev.2, 0.23.46

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
4.0 · CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from osv record GHSA-c8m5-c952-6cm4

  2. Revision 2 · amended ·

    Amended from ghsa record GHSA-c8m5-c952-6cm4

  3. Revision 1 · created ·

    Published from osv record RUSTSEC-2026-0346

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-c8m5-c952-6cm4

Advisory: Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs
IDs: GHSA-c8m5-c952-6cm4
Record: https://patchnext.com/advisories/rustsec-2026-0346 (revision 3, source checked 28 Oct 2026, 06:30 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 4.0)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: rustls 0.24.0-dev.2, 0.23.46. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io rustls: affected < 0.23.46; >= 0.24.0-dev.1, < 0.24.0-dev.2; fixed in 0.24.0-dev.2, 0.23.46

## Suggested inspection (read-only)
- crates.io rustls: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on rustls.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/RUSTSEC-2026-0346 (OSV record RUSTSEC-2026-0346 lists affected ranges: crates.io rustls >=0.21.0 <0.23.46 (fixed))
- Verified: https://github.com/advisories/GHSA-c8m5-c952-6cm4 (GitHub-reviewed advisory GHSA-c8m5-c952-6cm4 lists affected ranges: crates.io rustls >=0 =0.24.0-dev.1 <0.24.0-dev.2)
- Verified: https://osv.dev/vulnerability/GHSA-c8m5-c952-6cm4 (OSV record GHSA-c8m5-c952-6cm4 lists affected ranges: crates.io rustls >=0 =0.24.0-dev.1 <0.24.0-dev.2 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…