Summary
CVE-2026-19773 is a critical out-of-bounds write vulnerability in libwebsockets, an open-source C library widely embedded in IoT devices, network appliances, and applications to provide WebSocket and HTTP/2 server functionality. The flaw resides in the library’s HTTP/2 HPACK header decompression logic when parsing the :path pseudo-header, and it can be triggered remotely by an unauthenticated attacker sending a specially crafted HTTP/2 request. Successful exploitation can lead to arbitrary code execution in the context of the process using libwebsockets, and the issue has been assigned a CVSS v3.0 base score of 9.8 (Critical).
Technical details
- Root cause: Insufficient bounds validation in the HPACK header-fragment append routine (
lws_frag_append()inlib/roles/h2/hpack.c) allows attacker-controlled data from the:pathheader to be written past the end of the allocated header-data buffer. - Trigger condition: Occurs while a libwebsockets-based server decodes an HTTP/2 request’s compressed headers; no special server configuration is required beyond HTTP/2 support being enabled.
- Attack vector: Network-based (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N) — an attacker only needs network reachability to a vulnerable HTTP/2 endpoint.
- Impact: An out-of-bounds write in this context can corrupt adjacent heap memory, and per the vendor/advisory, can be leveraged to execute arbitrary code in the context of the affected process, fully compromising confidentiality, integrity, and availability of the host process.
- Disclosure path: Reported to the vendor via Trend Micro’s Zero Day Initiative (ZDI-26-590), credited to researcher Maher Azzouzi.
Affected software
- libwebsockets — all released versions prior to v5.0.0, including the 4.5.x and 4.4.x branches, that support HTTP/2 server-side HPACK header parsing.
- The vendor fix was landed on the
mainbranch and is first included in the v5.0.0 tag; earlier maintenance tags (e.g., v4.5.x) do not contain the corrective commit.
Severity
- CVSS v3.0 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CWE-787: Out-of-bounds Write
Mitigation and recommended actions
- Immediate: Upgrade libwebsockets to v5.0.0 or later, which includes the bounds check added to the HPACK header-append routine that prevents writes past the allocated
max_http_header_datalimit. - If immediate patching is not possible:
- Disable or restrict HTTP/2 support on libwebsockets-based servers until the upgrade can be applied, if HTTP/1.1-only operation is acceptable for your deployment.
- Restrict network exposure of affected services (e.g., place behind a WAF/reverse proxy that can filter or normalize HTTP/2 traffic, or limit access to trusted networks) as a temporary compensating control.
- Inventory embedded and third-party products that bundle libwebsockets (IoT firmware, network appliances, applications) since the library is frequently vendored, and confirm each is running a version that includes the fix.
- Monitor for crashes or anomalous process restarts on services using libwebsockets, which could indicate exploitation attempts.

