Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.1CVE-2026-136412

OpenResty stream-lua-nginx-module: use-after-free in cosocket receiveuntil()

Published 24/11/2026 · Updated 30/11/2026 · openresty stream-lua-nginx-module

Summary

OpenResty stream-lua-nginx-module versions before 0.0.20rc4 contain a use-after-free vulnerability (CWE-416). It occurs when a receiveuntil() pattern iterator is garbage-collected while the socket still references it. Later reads or socket closure then use the stale pointer to freed memory.

The attack is network-based and requires no authentication or user interaction, but attack complexity is high (AC:H): a remote peer must interrupt or close the cosocket connection at the right moment. The CVSS score is 8.1 (High).

The result is a crash or memory corruption of the nginx worker process. Per the CVSS vector, the impact on confidentiality, integrity and availability can be high. The flaw is not listed in CISA KEV, and the EPSS probability of exploitation is about 0.95%.

Who is affected

Organizations running OpenResty/nginx with stream-lua-nginx-module older than 0.0.20rc4, especially where Lua code uses cosocket receiveuntil().

What to do

  1. Upgrade stream-lua-nginx-module to version 0.0.20rc4 or later (fixed in GitHub commits 9591e20 and 7581c68).
  2. Inventory systems running the OpenResty/nginx stream module and check the bundled stream-lua-nginx-module version.
  3. Review Lua code in the stream context to determine whether receiveuntil() is used on cosockets.
  4. The vendor has not published a workaround. Until you upgrade, monitor logs for unexpected nginx worker crashes.

Affected products and versions

openresty stream-lua-nginx-module< 0.0.20rc4Fixed in: 0.0.20rc4

CVSS vector, explained

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network (from the internet)
Attack complexity
High
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.