Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInteract as peer of Lua cosocket
-
DeliveryTrigger receiveuntil() pattern iterator read
-
ExploitInterrupt or close connection forcing iterator GC
-
ExecutionLater read or close uses freed pattern pointer
-
ImpactCrash 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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.
Articles & Coverage 1
Executive ViewAI
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
In OpenResty through 1.13.6.1, URI parameters are obtained using the ngx.req.get_uri_args and ngx.req.get_post_args func
An issue in OpenResty lua-nginx-module v.0.10.26 and before allows a remote attacker to conduct HTTP request smuggling v
A security issue in nginx resolver was identified, which might allow an attacker who is able to forge UDP packets from t
Denial of service in OpenResty 1.29.2.1 through 1.29.2.4 arises from an out-of-bounds write (CWE-787) in the upstream PR
An issue was discovered in OpenResty before 1.15.8.4. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
Malformed DNS replies can crash the parser in lua-resty-dns before 0.24, causing resolver:query() to raise an uncaught L
In lj_str_hash.c in OpenResty 1.19.3.1 through 1.25.3.1, the string hashing function (used during string interning) allo
EUVD-2026-134470
GHSA-q6cp-77cr-6x4f
NVD
CVE.org
EPSS
Exploit-DB