Skip to main content

libwebsockets EUVDEUVD-2026-79130

| CVE-2026-19773 CRITICAL
Out-of-bounds Write (CWE-787)
2026-09-15 zdi GHSA-r4m8-276f-3r2f
Critical
Disputed · 9.8 Vendor: zdi
View

Attack ChainAIDerived

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

  1. Access
    Open HTTP/2 connection to server
  2. Delivery
    Send crafted HPACK path header
  3. Exploit
    Overflow header buffer via lws_frag_append
  4. Execution
    Corrupt adjacent heap memory
  5. Impact
    Execute code in process context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
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

Requires the target to be a libwebsockets build with HTTP/2 support enabled and serving over HTTP/2 (LWS_WITH_HTTP2); the flaw is reached only through the HPACK header-decoding path (lws_frag_append when appending a path/header fragment beyond max_http_header_data). No authentication or user interaction is needed per the CVSS vector (PR:N/UI:N), so any reachable HTTP/2 endpoint is exposed. Limiting factors: servers/embedded devices that only speak HTTP/1.1 or were not compiled with HTTP/2 are not affected, and turning the bounded OOB write into reliable arbitrary-code execution (rather than a crash) depends on heap layout, allocator, and platform, which raises real-world exploitation difficulty above the raw AC:L rating.

Impact

Signals point to a genuine high-priority memory-corruption flaw, but not one with confirmed active exploitation. The CVSS 3.0 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H, 9.8) describes a remote, unauthenticated, no-interaction OOB write, and CWE-787 plus the ZDI advisory (ZDI-26-590, ZDI-CAN-31036) and the vendor patch commit corroborate a real out-of-bounds write in HTTP/2 HPACK path-header parsing. However, there is no EPSS score, no KEV listing, and no public PoC provided, so this is 'no public exploit identified at time of analysis' - the RCE outcome is asserted by ZDI's classification rather than demonstrated by shipped exploit code. The one-line patch (a simple ah->pos >= max_http_header_data bounds check) confirms the write is a bounded header-buffer overflow, which reliably yields a crash/DoS; weaponizing it into arbitrary code execution requires heap grooming and is materially harder than the AC:L rating implies. Two caveats to verify: exploitation requires the server to have HTTP/2 enabled (a build/config precondition not reflected in AC:L), and 'code execution in the context of the current process' depends on allocator layout and target platform, so treat RCE as plausible-but-unproven and DoS as the confirmed impact.

Exploit ScenarioDerived

A remote, unauthenticated attacker opens an HTTP/2 connection to a libwebsockets-based server and sends a crafted HPACK-encoded request whose :path (or other) header fragment exceeds the header buffer, triggering an out-of-bounds write past the allocated header-allocation buffer. Reliably this crashes the process (DoS); with heap grooming the controlled overflow may be steered into code execution in the process context, as classified by ZDI. No public exploit code is provided in the available data.

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

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

Alert me

AnalysisAIv1 – Sep 16, 2026

An out-of-bounds heap write in libwebsockets' HTTP/2 HPACK header decoder lets unauthenticated remote attackers corrupt memory on any instance compiled with HTTP/2 support (LWS_WITH_HTTP2) and exposing an HTTP/2 listener. The flaw is a missing bound check in lws_frag_append(), which appends header/path fragments without verifying the write stays within the configured max_http_header_data limit, so a crafted HPACK-encoded request header can overrun the destination buffer and potentially yield code execution in the server process context. No public exploit code or confirmed active exploitation has been identified at time of analysis; the vendor has published an upstream fix commit (824151862f37bc72f46d9a3e01d5b9408d313a0b), and while the raw severity is rated 9.8 (CVSS 3.0), the independent assessment scores it CVSS 3.1 AV:N/AC:H, reflecting that the bounded write must still be shaped by heap layout and platform to become reliable arbitrary code execution rather than a crash. Affected: libwebsockets builds with HTTP/2 enabled; HTTP/1.1-only or non-HTTP/2 builds are not reachable through this path.

RemediationAI

Apply the upstream fix commit 824151862f37bc72f46d9a3e01d5b9408d313a0b (https://github.com/warmcat/libwebsockets/commit/824151862f37bc72f46d9a3e01d5b9408d313a0b), which introduces a bounds check in lws_frag_append() against max_http_header_data; because the reference is a raw commit rather than a tagged release, upstream fix is available via commit and a published patched release version has not been independently confirmed, so verify the release notes of the libwebsockets version you consume before assuming it contains the guard. Where the library cannot be rebuilt immediately, the most reliable compensating control is to disable HTTP/2 (compile without LWS_WITH_HTTP2, or configure the server not to negotiate h2 via ALPN), at the cost of losing multiplexing and header compression; terminating HTTP/2 at a hardened front-end proxy or CDN and speaking HTTP/1.1 to the libwebsockets backend also removes reachability, but adds a component and must be applied consistently or clients can bypass it and hit the origin directly. Restricting network exposure of libwebsockets HTTP/2 listeners to trusted management networks reduces attack surface but does not fix embedded devices that must serve untrusted clients. Rebuilding with hardened allocators and ASLR/stack protections raises the difficulty of turning the write into code execution but is defense-in-depth only, not a substitute for the patch. Note that lowering max_http_header_data is not a substitute for the fix, since the missing check is the root cause and enforcement would come at the cost of rejecting legitimate large headers. See ZDI-26-590 for the vendor-coordinated advisory.

Affected VersionsENISA

libwebsockets b4b5aed3903eaff09cd76a410f69bbe5dff66f8e

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

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

Technical ContextAI · show details

libwebsockets is a lightweight C library used both as a client and as an embedded HTTP/WebSocket server, widely deployed in IoT gateways, routers, and other constrained devices. HTTP/2 header compression is implemented via HPACK (RFC 7541), which encodes header fields as literal or indexed fragments that the server must reassemble. In lib/roles/h2/hpack.c, the helper lws_frag_append() accumulates individual header bytes into a per-connection reassembly buffer; the vulnerable revision failed to validate that the running position had not reached wsi->a.context->max_http_header_data before writing. This is a classic CWE-787 out-of-bounds write: attacker-controlled HPACK path (or other) header data is appended past the end of the allocated buffer, corrupting adjacent heap metadata or objects. The upstream fix adds the guard 'if ((unsigned int)ah->pos >= wsi->a.context->max_http_header_data) return 1;', causing decompression to abort with an error instead of writing. The CPE cpe:2.3:a:libwebsockets:libwebsockets:*:*:*:*:*:*:*:* and EUVD's affected revision b4b5aed3903eaff09cd76a410f69bbe5dff66f8e place this in the mainline libwebsockets tree prior to the fix. Reaching the code path requires the connection to be negotiated over HTTP/2 and to pass a header fragment through the HPACK decoder, which is why the independent assessment raises attack complexity (AV:N/AC:H/PR:N/UI:N) relative to the vendor advisory's AC:L rating: the write is bounded by the header accumulation limit, and converting it into controlled execution depends on surrounding heap layout.

Know when Libwebsockets 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

Sources disagree (Medium–Critical)
Vendor (zdi) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

Remote unauthenticated (AV:N/PR:N/UI:N), but AC:H because HTTP/2 must be enabled and reliable code execution from a bounded header overflow needs heap grooming; full impact retained given ZDI RCE classification.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 9.8 CRITICAL

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: zdi

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

libwebsockets HTTP/2 HPACK Path Header Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of libwebsockets. Authentication is not required to exploit this vulnerability.

The specific flaw exists within the parsing of HTTP/2 HPACK path header. The issue results from the lack of proper validation of user-supplied data, which can result in a write past the end of an allocated buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-31036.

Executive ViewAI

Why It Matters

A critical heap out-of-bounds write in libwebsockets' HTTP/2 HPACK header decoder can corrupt memory and potentially allow remote code execution in the server process. Any internet-facing service or embedded product compiled with HTTP/2 support (LWS_WITH_HTTP2) and exposing an HTTP/2 listener is at risk, which could lead to service disruption, data compromise, or full host takeover. No public exploit identified at time of analysis, but the critical severity and patch availability warrant immediate remediation, especially because libwebsockets is widely embedded in edge gateways, IoT devices, and API infrastructure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 51% exploitable
Prevalence
High
widely embedded C WebSocket/HTTP library in servers, IoT, and appliances
Data Quality
6 sources
Confidence: High

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.6%
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
Yes
Human Impact
High

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

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.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

SUSE

Severity: Moderate

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