CVE-2026-56434
Executive Summary
CVE-2026-56434 is a heap buffer over-read vulnerability in NGINX’s ngx_http_ssi_module, affecting both NGINX Plus and NGINX Open Source. The flaw is triggered when Server-Side Includes (SSI), proxy_pass, and proxy_buffering off are configured together. An unauthenticated attacker with man-in-the-middle (MITM) capability can control upstream responses, causing a heap buffer over-read in the NGINX worker process. This can lead to limited memory modification or a worker process restart. The vulnerability is data-plane only, with no control plane exposure. No public exploit or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby ecosystems. It affects NGINX directly, which is often distributed via official package repositories or container images. Organizations should verify their NGINX versions and monitor for official patches.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low
- Availability Impact: Low
The threat level is medium due to the requirement of MITM capability and specific configuration. However, in environments where upstream responses can be controlled (e.g., compromised upstream servers), the impact could be higher.
Deep Dive & Mechanics
The vulnerability resides in the ngx_http_ssi_module, which processes Server-Side Includes directives. When proxy_buffering is disabled, NGINX processes upstream responses in a streaming fashion. The SSI module may incorrectly handle buffer boundaries, leading to a heap buffer over-read. This occurs because the module reads beyond the allocated buffer when parsing SSI directives from the upstream response.
Root Cause: Improper bounds checking in the SSI parser when handling fragmented or manipulated upstream data. An attacker controlling the upstream response can craft SSI directives that cause the parser to read past the buffer end, potentially reading adjacent heap memory or causing a crash.
Impact: Limited memory modification (due to over-read potentially influencing subsequent writes) or worker process restart (due to segmentation fault). This can lead to denial of service or, in rare cases, information disclosure.
Vulnerable vs. Patched Code
No patch is currently available. The vulnerable code path is in ngx_http_ssi_module.c. The issue likely involves the ngx_http_ssi_parse function, which processes SSI commands. A patched version would include proper bounds checking to ensure the parser does not read beyond the buffer.
Vulnerable Code (Conceptual):
// In ngx_http_ssi_parse, when processing SSI directives
if (ctx->buffer[pos] == '<') {
// Read next bytes without checking buffer length
if (ctx->buffer[pos+1] == '!') {
// Process SSI command
}
}
Patched Code (Conceptual):
// Add bounds check before reading
if (pos + 1 < ctx->buffer_end) {
if (ctx->buffer[pos] == '<' && ctx->buffer[pos+1] == '!') {
// Process SSI command
}
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- MITM position between NGINX and upstream server.
- NGINX configured with
ssi on,proxy_pass, andproxy_buffering off.
Exploitation Steps:
- Intercept upstream response.
- Inject malicious SSI directives (e.g.,
<!--#echo var="DOCUMENT_URI" -->) with crafted padding to trigger over-read. - Observe worker process crash or memory corruption.
Example MITM payload (using Python with mitmproxy):
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
if "nginx" in flow.request.host:
# Inject SSI directive with padding to trigger over-read
flow.response.content = b"<!--#echo var=\"DOCUMENT_URI\" -->" + b"A"*1024
Blue Team
Detection:
- Monitor for worker process crashes (segfaults) in NGINX logs.
- Look for unusual SSI directives in upstream responses.
- Use network monitoring to detect MITM attacks.
Hunting:
- Search for
ngx_http_ssi_moduleerrors in NGINX error logs. - Check for abnormal memory access patterns using eBPF or similar tools.
Indicators of Compromise (IOCs)
- Network: Unusual SSI directives in HTTP responses (e.g.,
<!--#exec cmd="..." -->). - Logs: NGINX error log entries like
[alert] ... worker process ... exited on signal 11(SIGSEGV). - Memory: Heap over-read patterns in core dumps.
- Process: Unexpected restarts of NGINX worker processes.
Detection Engineering
YARA Rule
rule CVE_2026_56434_SSI_Overread {
meta:
description = "Detects potential SSI heap over-read exploitation in NGINX"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-56434"
strings:
$ssi_directive = /<!--#\s*(echo|set|include|exec)\s+.*?-->/ nocase
$nginx_worker_crash = "worker process" ascii
$signal_11 = "signal 11" ascii
condition:
$ssi_directive and ($nginx_worker_crash or $signal_11)
}
Sigma Rule
title: NGINX SSI Heap Over-read Exploitation
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential exploitation of CVE-2026-56434 via SSI directives and worker crashes
author: Valters IT
logsource:
product: nginx
service: error
detection:
selection:
- message: "worker process"
- message: "signal 11"
condition: selection
falsepositives:
- Legitimate SSI usage with misconfigured upstream
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2026-56434 NGINX SSI Heap Over-read Attempt"; flow:to_client; content:"<!--#"; nocase; pcre:"/<!--#\s*(echo|set|include|exec)\s+.*?-->/i"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SSI if not required:
ssi off;in NGINX configuration. - Enable
proxy_buffering on;to buffer upstream responses. - Use HTTPS to prevent MITM attacks.
- Restrict upstream server access to trusted sources.
Long-term:
- Apply official patch when released.
- Upgrade to latest NGINX version.
- Implement network segmentation to limit MITM exposure.
Workarounds:
- Replace SSI with alternative templating (e.g., server-side includes via application code).
- Use Web Application Firewall (WAF) to filter malicious SSI directives.
Valters IT
DevSecOps & Cyber Threat Intelligence