{"id":"CVE-2026-123640","state":"PUBLISHED","title":"NGINX ngx_stream_ssl_preread_module vulnerability","description":"Description\nWhen 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.\n\nImpact\nThis 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.\n\n\n\n\n\n\nNote: Software versions which have reached End of Technical Support (EoTS) are not evaluated.","publishedAt":"2026-11-18T15:23:27.556Z","updatedAt":"2026-11-18T16:51:01.723Z","severity":{"score":6.9,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","source":"f5"},"assigner":"f5","products":["F5 NGINX Plus","F5 NGINX Open Source"],"affected":[{"vendor":"F5","product":"NGINX Plus","defaultStatus":"unknown","versions":[{"version":"37.1.0","status":"affected","lessThan":"37.2.0.1","versionType":"custom"},{"version":"37.0.0","status":"affected","lessThan":"37.0.7.1","versionType":"custom"},{"version":"R33","status":"affected","lessThan":"*","versionType":"custom"}],"modules":["ngx_stream_ssl_preread_module"]},{"vendor":"F5","product":"NGINX Open Source","defaultStatus":"unknown","versions":[{"version":"1.31.0","status":"affected","lessThan":"1.31.9","versionType":"semver"},{"version":"1.30.0","status":"affected","lessThan":"1.30.7","versionType":"semver"},{"version":"1.15.2","status":"affected","lessThan":"*","versionType":"semver"}],"modules":["ngx_stream_ssl_preread_module"]}],"references":["https://my.f5.com/manage/s/article/K000163935"],"weaknesses":["CWE-1289"],"ingestedAt":"2026-11-18T16:56:06.277Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/123xxx/CVE-2026-123640.json","commit":"87d8f3f99b3cf427195a442e6563306f06dea55b","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-123640","state":"PUBLISHED","datePublished":"2026-11-18T15:23:27.556Z","dateUpdated":"2026-11-18T16:51:01.723Z","assignerShortName":"f5","assignerOrgId":"9dacffd4-cb11-413f-8451-fbbfd4ddc0ab","dateReserved":"2026-11-09T18:42:53.901Z"},"containers":{"cna":{"title":"NGINX ngx_stream_ssl_preread_module vulnerability","descriptions":[{"lang":"en","value":"Description\nWhen 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.\n\nImpact\nThis 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.\n\n\n\n\n\n\nNote: Software versions which have reached End of Technical Support (EoTS) are not evaluated."}],"affected":[{"vendor":"F5","product":"NGINX Plus","defaultStatus":"unknown","versions":[{"version":"37.1.0","status":"affected","lessThan":"37.2.0.1","versionType":"custom"},{"version":"37.0.0","status":"affected","lessThan":"37.0.7.1","versionType":"custom"},{"version":"R33","status":"affected","lessThan":"*","versionType":"custom"}],"modules":["ngx_stream_ssl_preread_module"]},{"vendor":"F5","product":"NGINX Open Source","defaultStatus":"unknown","versions":[{"version":"1.31.0","status":"affected","lessThan":"1.31.9","versionType":"semver"},{"version":"1.30.0","status":"affected","lessThan":"1.30.7","versionType":"semver"},{"version":"1.15.2","status":"affected","lessThan":"*","versionType":"semver"}],"modules":["ngx_stream_ssl_preread_module"]}],"references":[{"url":"https://my.f5.com/manage/s/article/K000163935","tags":["vendor-advisory","patch"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]},{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":6.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1289","description":"CWE-1289 Improper Validation of Unsafe Equivalence in Input","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"f5","orgId":"9dacffd4-cb11-413f-8451-fbbfd4ddc0ab","dateUpdated":"2026-11-18T15:23:27.556Z"},"credits":[{"lang":"en","type":"reporter","value":"F5 acknowledges Vivek Parikh of BreachX Zero Day Labs using Typhon AI Mil v2 for bringing this issue to our attention and following the highest standards of coordinated disclosure."}],"datePublic":"2026-11-18T15:00:00.000Z","source":{"discovery":"EXTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p></p><p>Disable the <strong>ssl_preread</strong> directive in favor of SSL/TLS termination on NGINX. For more information, refer to <a target=\"_blank\" rel=\"nofollow\" href=\"https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html\">https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html</a></p><p>For example, the following configuration includes the <strong>ssl_preread on;</strong> directive:</p><p></p><p>stream {<br>&nbsp; &nbsp; log_format sni \"PREREAD_SNI=[$ssl_preread_server_name] -&gt; [$backend]\";<br>&nbsp; &nbsp; access_log /var/log/nginx/stream.log sni;<br>&nbsp; &nbsp; map $ssl_preread_server_name $backend {<br>&nbsp; &nbsp; &nbsp; &nbsp; internal.test &nbsp; 127.0.0.1:9002; &nbsp; # privileged backend<br>&nbsp; &nbsp; &nbsp; &nbsp; default  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;127.0.0.1:9001; &nbsp; # public backend<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; server {<br>&nbsp; &nbsp; &nbsp; &nbsp; listen 9443;<br>&nbsp; &nbsp; &nbsp; &nbsp; ssl_preread on;<br>&nbsp; &nbsp; &nbsp; &nbsp; proxy_pass $backend;<br>&nbsp; &nbsp; }<br>}</p><p>To mitigate the issue for this configuration, make the following changes:</p><ul><li>Remove the <strong>ssl_preread</strong> directive.</li><li>Terminate TLS on NGINX by adding the following:<ul><li>Change the listener to ssl.</li><li>Configure a certificate and key.</li><li>Replacing <strong>$ssl_preread_server_name</strong> with <strong>$ssl_server_name</strong> to use SNI-based routing.</li></ul></li></ul><p>stream {<br>&nbsp; &nbsp; log_format sni \"TLS_SNI=[$ssl_server_name] -&gt; [$backend]\";<br>&nbsp; &nbsp; access_log /var/log/nginx/stream.log sni;<br>&nbsp; &nbsp; map $ssl_server_name $backend {<br>&nbsp; &nbsp; &nbsp; &nbsp; internal.test &nbsp; 127.0.0.1:9002; &nbsp; # privileged backend<br>&nbsp; &nbsp; &nbsp; &nbsp; default  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;127.0.0.1:9001; &nbsp; # public backend<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; server {<br>&nbsp; &nbsp; &nbsp; &nbsp; listen 9443 ssl;<br>&nbsp; &nbsp; &nbsp; &nbsp; ssl_certificate &nbsp; &nbsp; /etc/nginx/ssl/fullchain.pem;<br>&nbsp; &nbsp; &nbsp; &nbsp; ssl_certificate_key /etc/nginx/ssl/privkey.pem;<br>&nbsp; &nbsp; &nbsp; &nbsp; ssl_protocols &nbsp; &nbsp; &nbsp; TLSv1.2 TLSv1.3;<br>&nbsp; &nbsp; &nbsp; &nbsp; # ssl_preread removed; NGINX terminates client TLS.<br>&nbsp; &nbsp; &nbsp; &nbsp; proxy_pass $backend;<br>&nbsp; &nbsp; &nbsp; &nbsp; # Use these if the backends still expect TLS.<br>&nbsp; &nbsp; &nbsp; &nbsp; proxy_ssl on;<br>&nbsp; &nbsp; &nbsp; &nbsp; proxy_ssl_server_name on;<br>&nbsp; &nbsp; &nbsp; &nbsp; proxy_ssl_name $ssl_server_name;<br>&nbsp; &nbsp; }<br>}</p><p>After making the configuration changes, validate the configuration and reload, using the following commands:</p><p>nginx -t<br>nginx -s reload</p>"}],"value":"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 \n\nFor example, the following configuration includes the ssl_preread on; directive:\n\n\n\nstream {\n    log_format sni \"PREREAD_SNI=[$ssl_preread_server_name] -> [$backend]\";\n    access_log /var/log/nginx/stream.log sni;\n    map $ssl_preread_server_name $backend {\n        internal.test   127.0.0.1:9002;   # privileged backend\n        default           127.0.0.1:9001;   # public backend\n    }\n    server {\n        listen 9443;\n        ssl_preread on;\n        proxy_pass $backend;\n    }\n}\n\nTo mitigate the issue for this configuration, make the following changes:\n\n  *  Remove the ssl_preread directive.\n  *  Terminate TLS on NGINX by adding the following:  *  Change the listener to ssl.\n  *  Configure a certificate and key.\n  *  Replacing $ssl_preread_server_name with $ssl_server_name to use SNI-based routing.\n\n\n\n\n\nstream {\n    log_format sni \"TLS_SNI=[$ssl_server_name] -> [$backend]\";\n    access_log /var/log/nginx/stream.log sni;\n    map $ssl_server_name $backend {\n        internal.test   127.0.0.1:9002;   # privileged backend\n        default           127.0.0.1:9001;   # public backend\n    }\n    server {\n        listen 9443 ssl;\n        ssl_certificate     /etc/nginx/ssl/fullchain.pem;\n        ssl_certificate_key /etc/nginx/ssl/privkey.pem;\n        ssl_protocols       TLSv1.2 TLSv1.3;\n        # ssl_preread removed; NGINX terminates client TLS.\n        proxy_pass $backend;\n        # Use these if the backends still expect TLS.\n        proxy_ssl on;\n        proxy_ssl_server_name on;\n        proxy_ssl_name $ssl_server_name;\n    }\n}\n\nAfter making the configuration changes, validate the configuration and reload, using the following commands:\n\nnginx -t\nnginx -s reload"}],"x_generator":{"engine":"F5 SIRTBot v1.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-11-18T16:35:38.347306Z","id":"CVE-2026-123640","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-11-18T16:51:01.723Z"}}]}}}