nginx CVE-2026-97629: check ssl_session_ticket_key setup
CVE-2026-97629 hits nginx ssl_session_cache shared without ssl_session_ticket_key. Check with nginx -T; until patched, turn tickets off or use a static key.
This TLS session ticket issue was fixed by nginx in 1.30.6 and 1.31.7 on 2026-10-14, and by Ubuntu in USN-8955-1 on 2026-10-26 (1.24.0-2ubuntu7.19 on 24.04). Patch first — see Ubuntu 24.04 nginx USN-8955-1: verify the fix. This page covers reading your config against the condition and the vendor workarounds for when you cannot patch right away.
[1] Start with the vendor's condition and workarounds. The first sentence of the CVE record description:
It goes on to say an attacker could use this to bypass verification of client certificates. There are two workarounds: (a) remove the ssl_session_cache shared:name:size directive, or (b) load static ticket keys from a file with ssl_session_ticket_key. It also says that "systems that disable session tickets (ssl_session_tickets off;) are not affected". The CVE record scores it CVSS 3.1 6.5 (MEDIUM) and CVSS 4.0 8.3 (HIGH).
[2] Check your version. Automatic key rotation arrived in nginx 1.23.2 (2022-10-19): "TLS session tickets encryption keys are now automatically rotated when using shared memory in the ssl_session_cache directive."
| Source | Affected versions |
|---|---|
| nginx.org security advisories | 1.23.2-1.31.6 (fixed in 1.30.6+, 1.31.7+) |
| CVE record (NGINX Open Source) | from 1.23.3, 1.30.0-1.30.5, 1.31.0-1.31.6 |
| Ubuntu CVE page | fixed in 24.04, 26.04, 26.10; 22.04 and older "Not affected" |
The two official sources disagree on the first version (1.23.2 vs 1.23.3). If you run 1.23.2, treat it as affected.
[3] Find the three directives **per server block**. nginx -T includes every included file; also pull the server {, listen and include lines so you can tell which block each line belongs to.
$ sudo nginx -T 2>/dev/null | grep -nE "^# configuration file|^\s*(server \{|listen|include)|ssl_session_(cache|tickets|ticket_key)"…189:# configuration file /etc/nginx/conf.d/app.conf:190:server {191: listen 443 ssl;195: include /etc/nginx/snippets/tickets-off.conf;198:server {199: listen 8443 ssl;203: ssl_session_cache shared:SSL:10m;207:# configuration file /etc/nginx/snippets/tickets-off.conf:208:ssl_session_cache shared:le_nginx_SSL:10m;209:ssl_session_tickets off;**One ssl_session_tickets off; somewhere in the output does not make the whole server safe.** Here the file at lines 207-209 is included only by the 443 block (line 195). The 8443 block has a shared cache with neither off nor a key, so that block matches the condition. Lines written outside any server { (in the http block) apply to every server that does not set the value again.
What one server block shows (including values from http) | Reading |
|---|---|
ssl_session_cache shared: present, no ssl_session_ticket_key, no ssl_session_tickets off | matches the condition (8443 above) |
ssl_session_tickets off; present | not affected per the vendor text (443 above) |
ssl_session_ticket_key present | automatic rotation not in use |
no ssl_session_cache | does not match the shared condition |
ssl_session_tickets defaults to on, so no line means tickets are on. The official docs note that when ssl_session_tickets or ssl_session_ticket_key is set at server level, the value from the default server can be used; if you set it in only one server, check the default server for that port too. To also find blocks that use client certificates (what the CVE text says can be bypassed), add |ssl_verify_client to the pattern.
Confirm the reading by checking whether each port actually issues tickets (1 = tickets on, 0 = off):
$ echo | openssl s_client -connect 127.0.0.1:443 -tls1_2 2>/dev/null | grep -c "TLS session ticket lifetime hint"0$ echo | openssl s_client -connect 127.0.0.1:8443 -tls1_2 2>/dev/null | grep -c "TLS session ticket lifetime hint"1The table narrows candidates; a "not affected" row is not a substitute for patching.
[4] See where common setups land. Ubuntu 24.04's packaged /etc/nginx/nginx.conf had no ssl_session lines (grep exit code 1). The options-ssl-nginx.conf inside the certbot nginx plugin package (2.9.0) reads:
7:ssl_session_cache shared:le_nginx_SSL:10m;8:ssl_session_timeout 1440m;9:ssl_session_tickets off;It uses a shared cache but turns tickets off, so per the vendor text it is on the not-affected side. That holds only for blocks that include it. If other server blocks do not use that file, check them separately as in [3] — the per-block reading of the nginx -T output is what counts.
[5] To mitigate before patching, apply one vendor workaround. Back up first (sudo cp -a /etc/nginx /etc/nginx.bak-97629).
Turn tickets off (simplest):
ssl_session_cache shared:SSL:10m;ssl_session_tickets off;Use a static key (when several servers must share keys):
$ sudo install -d -m 700 /etc/nginx/ticket$ sudo sh -c "openssl rand 80 > /etc/nginx/ticket/current.key"$ sudo chmod 600 /etc/nginx/ticket/current.keyssl_session_cache shared:SSL:10m;ssl_session_ticket_key /etc/nginx/ticket/current.key;Per the official docs the key file must be 80 or 48 bytes. A 32-byte file failed the test:
nginx: configuration file /etc/nginx/nginx.conf test failedA static key never changes by itself. To rotate it, do not overwrite current.key; move it to previous.key and create a new one:
$ sudo mv /etc/nginx/ticket/current.key /etc/nginx/ticket/previous.key$ sudo sh -c "openssl rand 80 > /etc/nginx/ticket/current.key"$ sudo chmod 600 /etc/nginx/ticket/current.keyssl_session_cache shared:SSL:10m;ssl_session_ticket_key /etc/nginx/ticket/current.key;ssl_session_ticket_key /etc/nginx/ticket/previous.key;Per the official docs only the first key encrypts new tickets; the others decrypt tickets already issued. Reconnecting with a session saved before the change resumed when previous.key was kept (first line) and became a new session when the key was simply overwritten (second line). Overwriting does not drop connections, but every ticket issued so far stops working and clients fall back to a full handshake.
Reused, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384Either way, apply with sudo nginx -t && sudo systemctl reload nginx. To undo, delete the added line and run the same command.
[6] Confirm over a TLS 1.2 connection. With tickets on you get a TLS session ticket lifetime hint line; with tickets off you do not.
$ echo | openssl s_client -connect 127.0.0.1:443 -tls1_2 -servername example.com 2>/dev/null | grep -E "TLS session ticket lifetime hint|Session-ID:" Session-ID: F149CF2D… TLS session ticket lifetime hint: 300 (seconds)That is the result with the static key (tickets on); with ssl_session_tickets off; only the Session-ID: line appeared.
[7] After patching, remove the temporary static key. Per the official docs, a shared cache generates and periodically rotates ticket keys by itself unless ssl_session_ticket_key is set (1.23.2). Leaving the static key in place keeps automatic rotation off, and the same key stays in use until you rotate it by hand. If several servers genuinely need a shared key, keep it and continue rotating as in [5].
$ sudo sed -i '/ssl_session_ticket_key/d' /etc/nginx/conf.d/app.conf$ sudo nginx -T 2>/dev/null | grep -c "ssl_session_ticket_key"$ sudo rm /etc/nginx/ticket/current.key /etc/nginx/ticket/previous.key$ sudo nginx -t && sudo systemctl reload nginx$ echo | openssl s_client -connect 127.0.0.1:8443 -tls1_2 2>/dev/null | grep -c "TLS session ticket lifetime hint"A grep -c of 0 means no key line is left, and a final 1 means tickets are issued again with automatic keys (the test gave 0 and 1). Before deleting, make sure the /etc/nginx.bak-97629 copy from [5] exists. If you turned tickets off (ssl_session_tickets off;), deleting that line after patching turns them back on; whether to keep them on is your call.
Official sources: CVE-2026-97629 (CVE record), nginx security advisories, ngx_http_ssl_module, CVE-2026-97629 (Ubuntu). The F5 advisory K000162606 itself could not be opened.
Analyze your Nginx log in the browser ↗ — nothing is uploaded.
Check it with the Certificate (PEM · X.509) decoder tool ↗ — calculated in your browser.