CVE-2026-123640NGINX ngx_stream_ssl_preread_module vulnerability
Description When NGINX Plus or NGINX Open Source is configured with the ngx_stream_ssl_preread_module module, a specially crafted ClientHello message from an unauthenticated attacker causes forged values of the ngx_stream_ssl_preread_module variables, affecting virtual server selection. In addition, it may also cause a disagreement with a proxied server terminating the SSL/TLS connection without Transport Layer Security (TLS) 1.3 support. Impact This vulnerability may allow an attacker to forge values of the ngx_stream_ssl_preread_module variables and bypass the NGINX systems stream routing segmentation. As a result, the attacker may be able to route the connection to a privileged or internal backend that should be unreachable and gain access to sensitive information. There is no control plane exposure; this is a data plane issue only. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | nginx | Fixed | 1.30.4-7ubuntu1.2 | UBUNTU-CVE-2026-123640 |
| Ubuntu 26.04 | nginx | Fixed | 1.28.3-2ubuntu1.13 | UBUNTU-CVE-2026-123640 |
| Ubuntu 24.04 | nginx | Fixed | 1.24.0-2ubuntu7.21 | UBUNTU-CVE-2026-123640 |
| Ubuntu 22.04 | nginx | Fixed | 1.18.0-6ubuntu14.24 | UBUNTU-CVE-2026-123640 |
| Ubuntu 20.04 | nginx | Fix pending | 1.18.0-0ubuntu1.7+esm6 (Ubuntu Pro) | UBUNTU-CVE-2026-123640 |
| Ubuntu 18.04 | nginx | Fix pending | 1.14.0-0ubuntu1.11+esm7 (Ubuntu Pro) | UBUNTU-CVE-2026-123640 |
| Debian 14 | nginx | Fixed | 1.30.6-4 | DEBIAN-CVE-2026-123640 |
| Debian 13 | nginx | Fixed | 1.26.3-3+deb13u11 | DEBIAN-CVE-2026-123640 |
| Debian 12 | nginx | Fixed | 1.22.1-9+deb12u11 | DEBIAN-CVE-2026-123640 |
| Red Hat Enterprise Linux 10 | nginx | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-all-modules | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-core | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-filesystem | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-http-image-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-http-perl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-http-xslt-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-mail | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nginx-mod-stream | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-all-modules | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-core | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-filesystem | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-http-image-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-http-perl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-http-xslt-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-mail | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nginx-mod-stream | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-all-modules | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-filesystem | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-http-image-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-http-perl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-http-xslt-filter | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-mail | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nginx-mod-stream | Fix pending Fix deferred | ||
| Alpine Linux 3.24 | nginx | Fixed | 1.30.7-r0 | ALPINE-CVE-2026-123640 |
| Alpine Linux 3.23 | nginx | Fixed | 1.28.3-r8 | ALPINE-CVE-2026-123640 |
| Alpine Linux 3.22 | nginx | Fixed | 1.28.3-r8 | ALPINE-CVE-2026-123640 |
| Alpine Linux 3.21 | nginx | Fixed | 1.26.3-r4 | ALPINE-CVE-2026-123640 |
What the vendor says
As published in the CVE record by f5, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- F5 NGINX Plus: affected: 37.1.0 to before 37.2.0.1, 37.0.0 to before 37.0.7.1, R33 and later; fixed in
37.2.0.1,37.0.7.1 - F5 NGINX Open Source: affected: 1.31.0 to before 1.31.9, 1.30.0 to before 1.30.7, 1.15.2 and later; fixed in
1.31.9,1.30.7
Workaround: Disable the ssl_preread directive in favor of SSL/TLS termination on NGINX. For more information, refer to https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html For example, the following configuration includes the ssl_preread on; directive: stream { log_format sni "PREREAD_SNI=[$ssl_preread_server_name] -> [$backend]"; access_log /var/log/nginx/stream.log sni; map $ssl_preread_server_name $backend { internal.test 127.0.0.1:9002; # privileged backend default 127.0.0.1:9001; # public backend } server { listen 9443; ssl_preread on; proxy_pass $backend; } } To mitigate the issue for this configuration, make the following changes: * Remove the ssl_preread directive. * Terminate TLS on NGINX by adding the following: * Change the listener to ssl. * Configure a certificate and key. * Replacing $ssl_preread_server_name with $ssl_server_name to use SNI-based routing. stream {…
Vendor advisories:
- https://my.f5.com/manage/s/article/K000163935 (patch, vendor-advisory)
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.