Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
3.7
rustls can be tricked into using weak key exchange
published 25 days ago
Summary
The rustls library may accept a weaker encryption method if an attacker pretends to be the server and sends a crafted handshake message. This can cause future connections to the same site to use only the older X25519 key exchange, reducing security. Update rustls to the latest version or configure it to reject unexpected handshake messages.
What to do
- Update ctz rustls to version 0.23.46.
- Update ctz rustls to version 0.24.0-dev.2.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| crates.io | ctz | rustls |
< 0.23.46 >= 0.24.0-dev.1, < 0.24.0-dev.2 Fix: upgrade to 0.23.46
|
Original advisory text
rustls: An unauthenticated ServerHello poisons the per-name key-exchange record, so later ClientHellos carry only a classical X25519 share
## Summary
The client records the server-selected key-exchange group per server name when it processes the ServerHello, before the server is authenticated. A network attacker can answer one connection attempt for a target name with a ServerHello that selects X25519 and close the connection. Later ClientHellos for that name carry one X25519 share while supported_groups still lists X25519MLKEM768 first. If the server accepts that share instead of sending a HelloRetryRequest, the handshake completes with classical key exchange only and no error.
An attacker that answers one connection attempt for the target name with a ServerHello selecting X25519 changes every later ClientHello of that client for that name, for as long as the entry stays in the store. No certificate or completed handshake is needed: it parses the ClientHello, sends the ServerHello, and closes.
TLS 1.3 transcript binding stops an on-path attacker from editing the ClientHello of one connection. It does not stop the attacker from steering the client's prediction state beforehand, because that state is written from an unauthenticated message.
## What does not trigger it
- Servers that send a HelloRetryRequest. The connection stays hybrid and costs one extra round trip.
- A client configuration with resumption disabled: nothing is stored.
- A different server name: the record is per name.
## Impact
If the genuine server picks the group for which a share is present, instead of sending a HelloRetryRequest for its preferred hybrid group, the handshake completes with classical key exchange only, between two peers that both support the hybrid group. No error is raised. The confidentiality of recorded sessions against a future quantum adversary is lost for those connections (harvest now, decrypt later). There is no key compromise and no authentication bypass.
Note that this behaviour is discussed at length in [draft-ietf-tls-key-share-prediction](https://www.ietf.org/archive/id/draft-ietf-tls-key-share-prediction-01.html#name-security-considerations) so the actual security impact is largely down to a server policy decision.
The client records the server-selected key-exchange group per server name when it processes the ServerHello, before the server is authenticated. A network attacker can answer one connection attempt for a target name with a ServerHello that selects X25519 and close the connection. Later ClientHellos for that name carry one X25519 share while supported_groups still lists X25519MLKEM768 first. If the server accepts that share instead of sending a HelloRetryRequest, the handshake completes with classical key exchange only and no error.
An attacker that answers one connection attempt for the target name with a ServerHello selecting X25519 changes every later ClientHello of that client for that name, for as long as the entry stays in the store. No certificate or completed handshake is needed: it parses the ClientHello, sends the ServerHello, and closes.
TLS 1.3 transcript binding stops an on-path attacker from editing the ClientHello of one connection. It does not stop the attacker from steering the client's prediction state beforehand, because that state is written from an unauthenticated message.
## What does not trigger it
- Servers that send a HelloRetryRequest. The connection stays hybrid and costs one extra round trip.
- A client configuration with resumption disabled: nothing is stored.
- A different server name: the record is per name.
## Impact
If the genuine server picks the group for which a share is present, instead of sending a HelloRetryRequest for its preferred hybrid group, the handshake completes with classical key exchange only, between two peers that both support the hybrid group. No error is raised. The confidentiality of recorded sessions against a future quantum adversary is lost for those connections (harvest now, decrypt later). There is no key compromise and no authentication bypass.
Note that this behaviour is discussed at length in [draft-ietf-tls-key-share-prediction](https://www.ietf.org/archive/id/draft-ietf-tls-key-share-prediction-01.html#name-security-considerations) so the actual security impact is largely down to a server policy decision.
References
- https://github.com/rustls/rustls/security/advisories/GHSA-w44r-93j7-qv28 URL
- https://github.com/rustls/rustls/pull/3355 URL
- https://github.com/rustls/rustls/commit/8fa0dc5d517a63411ad1e528249bdf5b098ae5e4 URL
- https://github.com/rustls/rustls/commit/f04804fa13341a9b1dc02b5d1dd8a746f2c4b7fb URL
- https://github.com/rustls/rustls Product
- https://github.com/rustls/rustls/releases/tag/v/0.23.46 URL
- https://rustsec.org/advisories/RUSTSEC-2026-0349.html URL
Internet-facing
14 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker partial control (estimated)
Type
CWE-757Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')
Timeline
Published27 Oct 2026
Updated27 Oct 2026
First seen27 Oct 2026
Sources
GHSA-w44r-93j7-qv28 · OSV
Track software like this
Free during beta