TLS client authentication can be bypassed due to ticket resumption
TLS session tickets were not isolated between virtual hosts sharing an IP and port, so a ticket issued for one host could be resumed on another. An attacker authenticated to one site could use that ticket to bypass client certificate authentication on a second site they should not access.
- Fixed in 3 months
- Paid in 3 months
- Disclosed after 4 months
Summary by the program
When name-based virtual hosts are configured to share the same IP address and port combination, with TLS 1.3 and OpenSSL, a previously authenticated attacker can use session resumption to bypass client certificate authentication requirements on these servers. This vulnerability arises when TLS session tickets are used and/or the SSL session cache is used in the default virtual server and the default virtual server is performing client certificate authentication. This issue affects both the NGINX http and NGINX stream modules. (CVE-2025-23419)
The report
If you require the PoC, we can also attach it. As this issue is resolved and fixed, we assume this not to be required.
TLS session tickets are not properly isolated for multiple virtual hosts in one server. That is, a ticket issued for one virtual host, may be resumed at a different virtual host. Using this, we were able to circumvent client authentication in the following scenario: Two hosts need to enable client authentication. The attacker should only be able to access one but not the other. The attacker was still able to access the second site nonetheless.
We found that tickets are always resumed. If the HTTP host header and TLS SNI value diverge, the server correctly returns a 421 (if client authentication is used). However, if the SNI is chosen appropriately (changed to resumption host, or omitted), nginx allows the Host header to specify the second site.
Impact
We were able to circumvent client authentication. More specifically, if two sites (A and B) both use client authentication (but with different configurations), we could resume a TLS session from A at B. This achieves privilege escalation: Consider a user who is allowed to access A, but not B. They can connect to A, receive a ticket, and using that ticket access B.
Further, nginx uses the wrong key material on the second virtual host to encrypt the tickets. We do not see a direct impact for this, other than the privilege escalation.
Context
NGINX is a widely used web server and reverse proxy. It supports name-based virtual hosts, where multiple server blocks share the same IP address and port and are distinguished by the TLS SNI value and the HTTP Host header. When client certificate authentication is enabled on a virtual host, NGINX asks the client for a certificate during the TLS handshake and verifies it against the configured trust store.
TLS 1.3 introduces session resumption using pre-shared keys (PSKs). A server can issue a session ticket after a full handshake; the client can later present that ticket to resume the session without a full handshake. In OpenSSL, session tickets and the session cache are used to store resumption state. The report describes a flaw where session tickets are not properly isolated between virtual hosts that share the same IP address and port. As a result, a ticket issued for one virtual host can be resumed at another virtual host, bypassing client certificate authentication requirements on the second host. The issue affects both the NGINX http and stream modules and is tracked as CVE-2025-23419.
Setup
The report does not describe a specific lab setup, tooling, or exact versions beyond the general conditions. The preconditions are:
- Name-based virtual hosts configured to share the same IP address and port combination.
- TLS 1.3 with OpenSSL.
- TLS session tickets and/or the SSL session cache used in the default virtual server.
- The default virtual server performs client certificate authentication.
- At least two virtual hosts (A and B) that both use client authentication, but with different configurations, such that a user is authorised for A but not for B.
The researcher states that a proof of concept can be attached if required, but it is not included because the issue was already resolved and fixed.
Finding it
The researcher noticed that TLS session tickets are not properly isolated for multiple virtual hosts in one server. A ticket issued for one virtual host may be resumed at a different virtual host. This looked wrong because client authentication is supposed to be enforced per virtual host: a client that authenticated to host A should not be able to use that authenticated session to access host B, especially when B has different client authentication requirements.
The researcher also observed that tickets are always resumed. When the HTTP Host header and the TLS SNI value diverge, the server correctly returns a 421 status code if client authentication is used. However, if the SNI is chosen appropriately (changed to the resumption host, or omitted), NGINX allows the Host header to specify the second site. This means the SNI check alone does not prevent cross-host resumption when the SNI matches the host that issued the ticket.
Exploitation
Step 1: Obtain a ticket from host A
The attacker connects to virtual host A, for which they are authorised, and completes a TLS handshake with client authentication. The server issues a TLS session ticket. The report does not show the exact request or response for this step.
Step 2: Resume the session at host B
The attacker then connects to virtual host B, presenting the ticket obtained from A. Because tickets are not isolated per virtual host, the server resumes the session. The attacker sets the TLS SNI to the resumption host (A) or omits it, and sets the HTTP Host header to B. The server accepts the resumed session and allows access to B, even though the attacker did not authenticate to B and is not authorised for B.
The report does not include the raw HTTP requests or TLS handshake details. It states that the attacker was able to access the second site despite only being authorised for the first.
Root cause
The root cause is that TLS session tickets are not properly isolated for multiple virtual hosts in one server. The report states only that TLS session tickets are not properly isolated for multiple virtual hosts in one server, so a ticket issued for one virtual host may be resumed at another. The report notes that NGINX uses the wrong key material on the second virtual host to encrypt the tickets, but does not see a direct impact from this beyond the privilege escalation.
Existing defences did not stop the attack because the SNI check only returns 421 when the Host header and SNI diverge. By setting the SNI to the resumption host (A) or omitting it, the attacker avoids the 421 and the Host header is used to select the second site. The client authentication performed during the original handshake with A is carried over to the resumed session with B, so B does not perform its own client authentication.
Impact
An attacker who is authorised to access virtual host A but not virtual host B can bypass client authentication on B. This achieves privilege escalation: the attacker can connect to A, receive a ticket, and use that ticket to access B. The impact is limited to scenarios where both hosts use client authentication with different configurations and share the same IP address and port, and where the default virtual server performs client authentication and uses session tickets or the session cache.
Fix
The report states that the issue is resolved and fixed.
Variants to test
- A positive result is that a ticket from host A is accepted at host B when the SNI is set to A or omitted and the Host header is set to B.
Hunting notes
This kind of bug tends to hide in configurations where multiple virtual hosts share the same IP address and port and use TLS session resumption. During recon, look for servers that use TLS 1.3 and issue session tickets, especially when client authentication is enabled on some virtual hosts. Signals include a default virtual server that performs client authentication and uses session tickets or the session cache, and multiple virtual hosts with different client authentication requirements. To show impact, demonstrate that a ticket obtained from one virtual host can be used to access another virtual host that the client is not authorised for, achieving privilege escalation. The report describes the scenario where a user allowed to access A but not B can use a ticket from A to access B.
What happened, in plain words
Imagine a large office building with one front door and many companies inside, each on a different floor. The front door has a single security guard. When you show your ID once, the guard gives you a wristband so you do not have to show your ID again every time you come back. That wristband is meant to say "this person already proved who they are".
The bug in this report is that the wristband was not tied to a particular company. If you were allowed into company A but not company B, you could get a wristband at A's reception, then walk to B's floor, show the same wristband, and be let in. B never checked your ID itself; it trusted the wristband, and the wristband did not say which company had issued it.
In technical terms: NGINX, a very common web server, can host several websites on the same IP address and port. When those sites ask visitors for a client certificate (a digital ID card), a visitor who authenticated to one site could reuse a saved TLS session (the "wristband") to get into a second site without ever presenting a certificate to it. The second site should have demanded its own certificate, but it accepted the resumed session instead. This is tracked as CVE-2025-23419 and affects both the NGINX http and stream modules.
Context
What NGINX is
NGINX is a piece of software that runs on a server and answers requests from browsers. It is often used as a web server (serving pages directly) and as a reverse proxy (sitting in front of other programs and passing requests to them). It is one of the most widely deployed pieces of web infrastructure in the world, so a flaw in it matters to a lot of people.
Virtual hosts, and why several sites share one address
A server usually has one IP address, which is like a street address. But many websites can live at that same address. NGINX supports this through name-based virtual hosts: several server blocks (each one a website configuration) share the same IP address and port, and NGINX decides which one to use based on the name the visitor asked for.
There are two places that name can appear:
- TLS SNI (Server Name Indication): during the encrypted connection setup, the browser says which hostname it wants, in the clear, before encryption is fully established. This is how one server can present the right certificate for the right site.
- HTTP Host header: once the connection is up, every HTTP request carries a header saying which site the request is for.
Normally these two agree. The report is interesting precisely because an attacker can make them disagree.
Client certificate authentication
Most websites identify you with a password. Client certificate authentication works the other way round: your browser holds a digital certificate (a file proving an identity), and the server asks for it during the connection setup. The server checks that certificate against a list of trusted authorities (the trust store). If the certificate is not trusted, the connection is refused. This is common in corporate and internal systems, where a company issues certificates to its own staff.
TLS 1.3 and session resumption
TLS is the protocol that encrypts traffic between a browser and a server. Setting up a fresh encrypted connection (a full handshake) takes some work: agreeing on keys, proving identities, and so on. To save time, TLS 1.3 supports session resumption: after a full handshake, the server hands the client a session ticket, a small blob of data. Next time, the client presents the ticket and the server skips most of the handshake. The ticket is a kind of pre-shared key (PSK): both sides already know a secret, so they can get straight to encrypted traffic.
In OpenSSL, resumption state can be kept as session tickets or in the session cache.
The flaw
The report describes a flaw where session tickets are not properly isolated between virtual hosts that share the same IP address and port. In plain words: a ticket issued by site A is accepted by site B. Because the ticket proves "this client already authenticated", site B skips its own client certificate check. The issue affects both the NGINX http and stream modules and is tracked as CVE-2025-23419.
Setup
The report does not describe a specific lab setup, tooling, or exact versions beyond the general conditions. The preconditions are:
- Name-based virtual hosts configured to share the same IP address and port combination.
- TLS 1.3 with OpenSSL.
- TLS session tickets and/or the SSL session cache used in the default virtual server.
- The default virtual server performs client certificate authentication.
- At least two virtual hosts (A and B) that both use client authentication, but with different configurations, such that a user is authorised for A but not for B.
The researcher states that a proof of concept can be attached if required, but it is not included because the issue was already resolved and fixed.
A quick note on the default virtual server: when a request arrives that does not clearly match any configured site, NGINX falls back to one site marked as the default. The report's conditions say that this default site is the one doing client authentication and using tickets or the cache.
Finding it
The researcher noticed that TLS session tickets are not properly isolated for multiple virtual hosts in one server. A ticket issued for one virtual host may be resumed at a different virtual host. This looked wrong because client authentication is supposed to be enforced per virtual host: a client that authenticated to host A should not be able to use that authenticated session to access host B, especially when B has different client authentication requirements.
Think of it as a hotel where each floor has its own keycard system, but the cards turn out to open every floor. The card was supposed to prove "this guest is allowed on floor A". If it also opens floor B, the second floor's lock is effectively doing nothing.
The researcher also observed that tickets are always resumed. When the HTTP Host header and the TLS SNI value diverge, the server correctly returns a 421 status code if client authentication is used. However, if the SNI is chosen appropriately (changed to the resumption host, or omitted), NGINX allows the Host header to specify the second site. This means the SNI check alone does not prevent cross-host resumption when the SNI matches the host that issued the ticket.
Two terms here:
- 421 status code: an HTTP response meaning "Misdirected Request". The server is saying "you asked for a site that does not belong on this connection". It is a safety check.
- Diverging SNI and Host: the name given during connection setup (SNI) differs from the name given in the request (Host header). NGINX notices this and returns 421, but only when client authentication is in play.
The trick is that the attacker can avoid the 421 by making the SNI match the site that issued the ticket (A), or by leaving the SNI out entirely, while still putting B in the Host header. The safety check never fires, and the Host header is then used to pick site B.
Exploitation
Step 1: Obtain a ticket from host A
The attacker connects to virtual host A, for which they are authorised, and completes a TLS handshake with client authentication. The server issues a TLS session ticket. The report does not show the exact request or response for this step.
Why this step: the attacker needs a legitimate ticket. They cannot forge one, because it is encrypted with a key only the server knows. But they can earn one honestly from a site they are allowed to use, and that is enough.
Step 2: Resume the session at host B
The attacker then connects to virtual host B, presenting the ticket obtained from A. Because tickets are not isolated per virtual host, the server resumes the session. The attacker sets the TLS SNI to the resumption host (A) or omits it, and sets the HTTP Host header to B. The server accepts the resumed session and allows access to B, even though the attacker did not authenticate to B and is not authorised for B.
The report does not include the raw HTTP requests or TLS handshake details. It states that the attacker was able to access the second site despite only being authorised for the first.
Why this step works, in everyday terms: the guard at B's door sees a wristband and waves the visitor through, without checking which company issued the wristband. The visitor made sure to say "I am here for company A" at the front door (the SNI), so the building's cross-check did not complain, and then asked for company B once inside (the Host header).
Root cause
The root cause is that TLS session tickets are not properly isolated for multiple virtual hosts in one server. The report states only that TLS session tickets are not properly isolated for multiple virtual hosts in one server, so a ticket issued for one virtual host may be resumed at another. The report notes that NGINX uses the wrong key material on the second virtual host to encrypt the tickets, but does not see a direct impact from this beyond the privilege escalation.
A few terms unpacked:
- SSL_CTX: short for SSL context. It is the object in OpenSSL that holds the settings and keys for a TLS endpoint. If two sites share one context, they share its secrets.
- Key material: the secret bytes used to encrypt and decrypt data.
Existing defences did not stop the attack because the SNI check only returns 421 when the Host header and SNI diverge. By setting the SNI to the resumption host (A) or omitting it, the attacker avoids the 421 and the Host header is used to select the second site. The client authentication performed during the original handshake with A is carried over to the resumed session with B, so B does not perform its own client authentication.
In other words, the only guard against mixing sites was a comparison between two names. Once the attacker made those names agree at the connection level, the guard had nothing to complain about, and the per-site certificate check never ran.
Impact
An attacker who is authorised to access virtual host A but not virtual host B can bypass client authentication on B. This achieves privilege escalation: the attacker can connect to A, receive a ticket, and use that ticket to access B. The impact is limited to scenarios where both hosts use client authentication with different configurations and share the same IP address and port, and where the default virtual server performs client authentication and uses session tickets or the session cache.
Privilege escalation simply means getting access to something you were not supposed to have. Here, a user with permission for one site gains permission for another. The program rated the issue medium severity and paid a bounty of 2162.00 USD.
Fix
The report states that the issue is resolved and fixed.
In the office-building comparison: give each company its own wristband design and its own list of valid wristbands, so a wristband from company A means nothing at company B's door.
Variants to test
These are follow-up ideas for anyone hunting similar bugs. Each one is a way of asking "does this other setup have the same wristband problem?"
- A positive result is that a ticket from host A is accepted at host B when the SNI is set to A or omitted and the Host header is set to B.
A note on the stream module: NGINX can proxy not only HTTP but also raw TCP or UDP traffic. The stream module handles that. The same resumption flaw applies there, which broadens the kinds of services that could be affected beyond websites.
Hunting notes
This kind of bug tends to hide in configurations where multiple virtual hosts share the same IP address and port and use TLS session resumption. During recon, look for servers that use TLS 1.3 and issue session tickets, especially when client authentication is enabled on some virtual hosts. Signals include a default virtual server that performs client authentication and uses session tickets or the session cache, and multiple virtual hosts with different client authentication requirements. To show impact, demonstrate that a ticket obtained from one virtual host can be used to access another virtual host that the client is not authorised for, achieving privilege escalation. The report describes the scenario where a user allowed to access A but not B can use a ticket from A to access B.
Recon means the early phase of security testing where you look around and gather information about what a target is running, before trying anything clever. Here, the signal to look for is a server that hosts several sites on one address, asks for client certificates, and hands out session tickets.
Glossary
- API: a defined way for one program to talk to another, like a menu of requests a service accepts and the answers it gives.
- Bounty: a payment made by a company or program to a researcher who reports a valid security bug.
- Browser: the program you use to visit websites, such as Firefox or Chrome.
- CA trust store: the list of certificate authorities a server trusts when checking a client certificate.
- Client certificate authentication: a way of proving identity where the visitor presents a digital certificate instead of a password, and the server checks it against trusted authorities.
- CVE: a public identifier for a known security vulnerability, here CVE-2025-23419.
- Default virtual server: the site configuration NGINX falls back to when a request does not clearly match any configured site.
- Host header: an HTTP header in every request naming which website the request is for.
- HTTP: the protocol browsers and servers use to exchange web requests and responses.
- HTTP 421: a response meaning "Misdirected Request", used when the requested site does not belong on this connection.
- Name-based virtual hosts: several websites configured on one server sharing the same IP address and port, told apart by the name requested.
- NGINX: a widely used web server and reverse proxy.
- OpenSSL: the cryptography library NGINX uses to handle TLS.
- Port: a numbered channel on a server, so one IP address can host many services.
- Pre-shared key (PSK): a secret both sides already know, used to skip part of the connection setup.
- Privilege escalation: gaining access to something you were not authorised to use.
- Proof of concept (PoC): a small demonstration that proves a vulnerability is real.
- Reverse proxy: a server that sits in front of other programs and forwards requests to them.
- Session cache: a server-side store of resumption state, an alternative to session tickets.
- Session resumption: reusing an earlier encrypted session so a new connection can skip the full setup.
- Session ticket: a blob of data the server gives the client after a full handshake, which the client can present later to resume the session.
- SNI (Server Name Indication): the hostname a browser states during connection setup, so the server knows which site's certificate to present.
- SSL_CTX: the OpenSSL object holding the settings and keys for a TLS endpoint.
- Stream module: the NGINX module that proxies raw TCP or UDP traffic rather than HTTP.
- TLS: the protocol that encrypts traffic between a browser and a server.
- TLS 1.3: a version of TLS that supports session resumption using pre-shared keys.
- Trust store: the collection of trusted certificate authorities a server checks certificates against.
- Virtual host: one website configuration on a server that may share an address with others.