Skip to main content

stream-lua-nginx-module EUVDEUVD-2026-134470

| CVE-2026-136412 CRITICAL
Use After Free (CWE-416)
2026-11-24 VulnCheck GHSA-q6cp-77cr-6x4f
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Interact as peer of Lua cosocket
  2. Delivery
    Trigger receiveuntil() pattern iterator read
  3. Exploit
    Interrupt or close connection forcing iterator GC
  4. Execution
    Later read or close uses freed pattern pointer
  5. Impact
    Crash or corrupt nginx worker

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target to run OpenResty's stream-lua-nginx-module (versions before 0.0.20rc4) with Lua code that uses a cosocket receiveuntil() pattern iterator - this is not a default nginx configuration but an application-specific use of the stream Lua API. The attacker must be the remote peer on the other end of that cosocket connection, able to interrupt or close it, and must hit the timing window in which the pattern iterator is garbage-collected while still referenced by the socket (reflected as AC:H/AT:P). Limiting factors: the vulnerable receiveuntil() code path must actually be used by the deployed Lua application, the attacker needs to control/influence the peer connection to force the close/GC race, and successful triggering depends on GC timing rather than a single deterministic request; no authentication is required (PR:N).

Impact

This is a genuine high-priority issue, corroborated by multiple independent signals rather than a single inflated score. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) describes a network-reachable, unauthenticated flaw, and the vuln.today Decision label is act_now, with the finding reported by VulnCheck and a vendor patch already available. That said, several severity-inflating caveats apply. The source rates vulnerable-system impact as VC:H/VI:H/VA:H (score 9.2), but the description only demonstrates crashing or corrupting the nginx worker - i.e. the concretely established impact is denial of service (a worker crash), while confidentiality/integrity consequences of the memory corruption are plausible but not shown; the tag set (Denial Of Service, Use After Free, Memory Corruption) reinforces that DoS is the primary realistic outcome. The AC:H/AT:P metrics reflect a real limiting factor: exploitation depends on a timing window in which the receiveuntil() pattern iterator is garbage-collected while still referenced by the socket, which the attacker provokes by interrupting or closing the cosocket connection. No EPSS score and no CISA KEV status are present in the input, and no public exploit is listed, so there is no evidence of widespread or automated exploitation yet - the priority rests on the act_now label, the credible reporter, and the unauthenticated network vector, not on observed in-the-wild activity.

Exploit ScenarioDerived

A remote peer communicating with a stream-lua cosocket that uses receiveuntil() abruptly interrupts or closes the connection at the moment the Lua pattern iterator is being garbage-collected, so a subsequent read or socket close dereferences the freed compiled-pattern pointer. The resulting use-after-free crashes the nginx worker (denial of service) and, because it is memory corruption, could in principle be driven toward further compromise. No public exploit is listed in the input, though the vendor patch ships a regression test that reproduces the crash condition.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 24, 2026

A use-after-free in OpenResty's stream-lua-nginx-module, present in versions before 0.0.20rc4, lets the remote peer of a cosocket connection crash or corrupt an nginx worker when a receiveuntil() pattern iterator is garbage-collected while the socket still holds a pointer to it. Only deployments running stream-context Lua code that actually calls receiveuntil() are exposed; the attacker must be on the other end of that cosocket connection and succeed in a garbage-collection timing window (reflected in the assessed AC:H/AT:P), with confidentiality and integrity impact limited but availability impact high because the worker can abort. The vendor has released a fix in the 0.0.20rc4 tag, the issue carries an act_now priority and is corroborated by VulnCheck; no public exploit code and no CISA KEV entry were identified at time of analysis.

RemediationAI

Vendor-released patch: v0.0.20rc4. Update stream-lua-nginx-module to the 0.0.20rc4 tag (https://github.com/openresty/stream-lua-nginx-module/tree/v0.0.20rc4) or a later release, or move to the OpenResty bundle build that contains it; the fix itself is carried in commits 9591e20ab754e78437b7519053ff496aca25f531 and 7581c68b43e1645bffe0d7262b1f4230d9698a6a, which add the ngx_stream_lua_socket_tcp_detach_pattern() helper, clear the pattern-to-socket linkage as soon as a read returns to Lua, and cover the case in new regression tests. Because the flaw is a garbage-collection race rather than a request pattern that can be filtered, and no separate workaround is documented in the available references, updating is the only complete remediation; organizations that cannot patch immediately should inventory stream-context Lua scripts for receiveuntil() usage and treat those services as the exposed surface, and should watch nginx worker logs and restart events for unexplained crashes since a triggered use-after-free presents as worker termination or memory corruption rather than a graceful error. Validate the deployed module version after upgrading, since the fix first ships in a release candidate tag.

Affected VersionsENISA

stream-lua-nginx-module 0 <0.0.20rc4

Affected Packages

euvd stream_lua_nginx_module fix: 0.0.20rc4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

OpenResty's stream-lua-nginx-module exposes the cosocket API (ngx.socket.tcp) inside the ngx_stream Lua subsystem. The receiveuntil() method compiles a delimiter pattern into an ngx_stream_lua_socket_compiled_pattern_t object and links it bidirectionally with the active cosocket upstream state: cp->upstream points at the socket and u->input_filter_ctx points back at the compiled pattern. That compiled pattern is a Lua-managed object with a __gc metamethod, so the Lua garbage collector may free it at any point after the iterator becomes unreachable from Lua, while the socket's C-side state can still dereference it on a later read or during socket close/finalization - the classic CWE-416 use-after-free. The upstream fix (commits 9591e20 and 7581c68) factors the pointer teardown into a new helper, ngx_stream_lua_socket_tcp_detach_pattern(), which clears cp->upstream and u->input_filter_ctx; it is now invoked in the receive return-value handler so the iterator can be collected safely as soon as a read returns to Lua, and it replaces the inline detach previously done only in finalize_read_part. The patch also reorders the receiveuntil iterator setup so the pattern is registered with the socket after initialization, and adds regression tests (TEST 21 and TEST 22 in t/066-socket-receiveuntil.t) covering a socket close after GC of a used iterator and a timed-out read retried on the same iterator with a partial delimiter. The exact trigger sequence is described in the commit and test code rather than in the CVE narrative; a successful hang depends on GC timing rather than a single deterministic request.

Know when Openresty gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

Remote unauthenticated peer (AV:N/PR:N) but needs a GC-timing race via connection interrupt (AC:H); demonstrated impact is worker crash (A:H) with only plausible, unproven C/I corruption (C:L/I:L).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

OpenResty stream-lua-nginx-module before 0.0.20rc4 contains a use-after-free vulnerability that allows remote peers to trigger access to freed memory when a receiveuntil() pattern iterator is garbage-collected while still referenced by the socket. Attackers can interrupt or close the cosocket connection so later reads or socket closure use the stale pattern pointer, crashing or corrupting the nginx worker.

Executive ViewAI

Why It Matters

CVE-2026-136412 is a critical use-after-free vulnerability in OpenResty's stream-lua-nginx-module that can crash or corrupt worker processes, directly impacting service availability for deployments using stream-context Lua with receiveuntil(). Leadership should care because a remote peer on a cosocket connection could disrupt operations, though exploitation requires specific timing and configuration.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 40% exploitable
Prevalence
Medium
OpenResty stream-lua module; common in gateways/proxies but not universal
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy