CVE-2026-123640

Description

A flaw was found in NGINX when configured with the stream SSL preread module. An unauthenticated remote attacker can exploit this vulnerability by sending a specially crafted Transport Layer Security (TLS) ClientHello handshake message to manipulate internal routing variables. Successful exploitation allows the attacker to bypass stream routing segmentation, potentially redirecting connections to unauthorized internal backend servers and accessing sensitive data.

Statement

Red Hat rates this vulnerability as Moderate because exploitation is constrained to non-default configurations where the stream SSL preread module is actively utilized to route traffic. While an unauthenticated remote attacker can manipulate TLS ClientHello data to induce incorrect virtual server selection and reach unintended backend destinations, the impact is confined to data plane routing and does not allow control plane takeover or host-level compromise. Standard NGINX installations that do not parse stream TLS handshakes via the preread module are not exposed to this issue.

Mitigation

Disable the `ssl_preread` directive in NGINX stream server blocks where TLS ClientHello inspection is not required, or restrict network access to trusted clients.

To disable the preread module parsing, ensure `ssl_preread off;` is set (or remove `ssl_preread on;`) within the stream server context in `/etc/nginx/nginx.conf`, test the configuration, and reload the service:

# nginx -t
# systemctl reload nginx

Alternatively, limit exposure of the stream port to trusted networks using firewalld:

# firewall-cmd --permanent --zone=trusted --add-source=<trusted_ip_or_cidr>
# firewall-cmd --permanent --zone=trusted --add-port=<port>/tcp
# firewall-cmd --reload

Caveat: Disabling `ssl_preread` prevents extraction of SNI and other handshake fields, which disrupts configurations relying on `$ssl_preread_server_name` for upstream routing. Reloading the NGINX service or firewall rules will apply changes immediately and may affect active connection handling.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.3N/A5.3
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityNoneN/ANone
Integrity ImpactLowN/ALow
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Understanding the Weakness (CWE)

Other

Technical Impact: Varies by Context

When untrusted input is not properly validated for the expected syntax, attackers could cause parsing failures, trigger unexpected errors, or expose latent vulnerabilities that might not be directly exploitable if the input had conformed to the syntax.

Frequently Asked Questions

Want to get errata notifications? Sign up here.