Skip to content

GHSA-vp88-798v-h67f RUSTSEC-2026-0347

rustls: ECH rejection can expose buffered application data to authenticated outer server before `ech_required` alert

Low crates.io
Severity
2.3 / 10
Low · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Fix
0.23.46
Upgrade rustls to this version or later

Description

In rustls 0.23.44 and 0.23.45, application data that a client buffers before the handshake completes is sent to the server even when the server rejects Encrypted Client Hello (ECH).

When the server rejects ECH, the client completes the handshake with the outer ClientHello and authenticates the server against the ECH config's public_name. At the end of the handshake, start_traffic() encrypts and queues any plaintext buffered by ClientConnection::writer(). It does this before checking for EchStatus::Rejected and queueing the ech_required alert.

The application then receives Error::PeerIncompatible(ServerRejectedEncryptedClientHello), as expected. However, the client is still expected to call write_tls() to send the fatal alert, and that call also sends the encrypted application data. The server decrypts the data and only then receives the alert.

The ordering bug is older than 0.23.44. Before 0.23.44, the client checked the server certificate against the inner server name rather than public_name, so a correctly configured server failed certificate verification first and no data was sent. 0.23.44 fixed that check, which makes the ordinary rejection path reachable.

Impact

Plaintext meant for the inner server, the one named in the encrypted ClientHello, goes to the client-facing server identified by public_name. That server is properly authenticated, so this is not an attack by an unauthenticated party. However this violates RFC 9849, which says the following:

  • Section 6.1.6: if the handshake and authentication succeed after ECH rejection, the client "MUST ... abort the connection with an "ech_required" alert before sending any application data to the server."
  • Section 6.1.7: the certificate is checked only against public_name, and the connection "MUST NOT" be reported as successful to the application. rustls does report failure correctly. The problem is only that data is sent before the alert.

This affects only clients that meet all of these conditions:

  • They use EchMode::Enable. GREASE ECH is not affected.
  • They write application data before the handshake completes.
  • They connect to a server that rejects their ECH config, for example because the config is stale. This is the same case where the server returns retry configs.

The usual client response to rejection is to retry with the server's retry configs. In that case, the data has already gone to the outer server.

Affected versions

crates.io

PackageVulnerableFixed in
rustls
>= 0.23.44, < 0.23.46
0.23.46
rustls
>= 0.24.0-dev.1, < 0.24.0-dev.2
0.24.0-dev.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

rustls crates.io → 0.23.46

cargo
cargo update -p rustls --precise 0.23.46

Severity breakdown

CVSS 3.1 2.3

CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

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

Weakness

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References

Timeline

  1. Published
  2. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-w44r-93j7-qv28
rustls: An unauthenticated ServerHello poisons the per-name key-exchange record, so later ClientHellos carry only a classical X25519 share
Low Also affects rustls
GHSA-h2v8-394m-p7vv
Rustls: Brotli certificate decompression can allocate an attacker-controlled amount of memory up to 1 GiB before authentication.
Low Also affects rustls
GHSA-c8m5-c952-6cm4
Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs
Medium Also affects rustls
GHSA-2mjx-qc3c-rqvc
Rustls: TLS 1.3 handshake messages incorrectly accepted across encryption level boundaries
Medium Also affects rustls
GHSA-qg5g-gv98-5ffh
rustls network-reachable panic in `Acceptor::accept`
High Also affects rustls
GHSA-6g7w-8wpp-frhj
Denial of Service Vulnerability in Rustls Library
High Also affects rustls
GHSA-j7qq-vr8c-xvw3
MLflow CrewAI autologging records LLM provider API keys in logged trace spans
Medium Same weakness, CWE-200
GHSA-gqh3-7856-rjjg
ApostropheCMS: :_id/locales REST route omits the public-API authorization gate its sibling read routes enforce (unauthenticated doc-existence + locale metadata disclosure)
Medium Same weakness, CWE-200
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor