0-RTT and session tickets
A request sent before the handshake finishes can arrive twice.
Leave early data off unless requests are safe to repeat. Check how your server rotates session ticket keys.
Added Updated
What to do
0-RTT (also called early data) lets a returning client send a request in its very first message. The catch is that an attacker can copy that message and send it again. Fetching the same image twice is usually harmless. Submitting the same payment twice can charge someone twice. Leave it off unless every request it can carry is safe to repeat.
Session tickets let a client resume a session without a full handshake. The server encrypts them with a ticket key. A stolen ticket key can expose resumption secrets. The impact on recorded traffic depends on the protocol and how the session resumed. Rotate it at least daily.
How to check
Search your config for early data, for example ssl_early_data in nginx. It is off by default in most servers. On a CDN, look for a "0-RTT" switch.
For tickets, find out where the key comes from. If you supply a key file, check when it was last replaced and how the server picks up its replacement. If the server manages keys itself, check its rotation interval.
How to fix it
Turning both off is the safe default:
ssl_early_data off;
ssl_session_tickets off;
If you want resumption for speed, keep tickets on and let the server generate and rotate the keys itself, or rotate a shared key file on a schedule across your fleet.
If you do enable 0-RTT, have your application reject early data on anything that changes state. RFC 8470 defines the Early-Data request header and the 425 Too Early response for this.
Sources
- RFC 8446: TLS 1.3, section 8 (0-RTT and anti-replay) fetched
- RFC 8470: Using Early Data in HTTP fetched
- RFC 9325: Recommendations for Secure Use of TLS and DTLS fetched
Changelog
- Clarified the replay risk and how to check key rotation.
- First version.