425 Too Early는 서버가 재전송(replay) 위험이 있는 요청을 처리하기를 거부했다는 뜻입니다. TLS 1.3의 0-RTT '이른 데이터(early data)' 기능과 관련이 있습니다.
0-RTT는 핸드셰이크가 끝나기 전에 데이터를 보내 속도를 높이지만, 이 데이터는 공격자가 가로채 재전송할 수 있습니다. 따라서 결제·이체처럼 재실행되면 위험한 비멱등 요청을 early data로 받으면 서버는 425로 거부하고 핸드셰이크 완료 후 재시도를 요구합니다.
POST /transfer HTTP/1.1
Host: bank.example.com
Early-Data: 1
{"amount":1000}HTTP/1.1 425 Too Early
Content-Type: text/plain
Early data is not allowed for this request; retry after the handshake.# Refuse TLS 1.3 0-RTT early data for non-idempotent requests
location /transfer {
if ($ssl_early_data) {
return 425;
}
proxy_pass http://backend;
}