CVE-2026-136412: OpenResty stream-lua-nginx-module before 0.0.20rc4 Use-After-Free via cosocket receiveuntil()
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.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
A remote peer that can establish or interact with a cosocket connection to an affected stream-lua-nginx-module deployment may be able to trigger it. No authentication or user interaction is indicated by the provided vector.
What conditions are needed to trigger the vulnerability?
The affected Lua code must use a receiveuntil() pattern iterator that is garbage-collected while the socket still retains a reference to it. The remote peer can then interrupt or close the connection, causing later reads or socket cleanup to use the stale pointer.
What is the impact if exploitation succeeds?
The issue can cause access to freed memory in an nginx worker. This may crash or corrupt the worker, with high confidentiality, integrity, and availability impact indicated by the severity vector.
Which versions are affected?
Versions of OpenResty stream-lua-nginx-module before 0.0.20rc4 are affected. The provided references include the v0.0.20rc4 source tree and two remediation commits.