GHSA-vp88-798v-h67f: rustls: ECH rejection can expose buffered application data to authenticated outer server before `ech_required` alert
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.
References
- github.com/advisories/GHSA-vp88-798v-h67f
- github.com/rustls/rustls/commit/2bd5c0cefabb2c5fd4100383a736d59f9671b9b4
- github.com/rustls/rustls/commit/4de14a508fbfa2273203ec17d9dfdd0fbd29e8d1
- github.com/rustls/rustls/commit/7dcbe4c1ae12185237d22e9197583329630a2014
- github.com/rustls/rustls/pull/3300
- github.com/rustls/rustls/pull/3354
- github.com/rustls/rustls/releases/tag/v/0.23.46
- github.com/rustls/rustls/security/advisories/GHSA-vp88-798v-h67f
- rustsec.org/advisories/RUSTSEC-2026-0347.html
Code Behaviors & Features
Detect and mitigate GHSA-vp88-798v-h67f with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →