Skip to main content

libwebsockets EUVDEUVD-2026-64685

| CVE-2026-78161 MEDIUM
Out-of-bounds Write (CWE-787)
2026-08-24 VulDB GHSA-83xp-6qr9-g946
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Connect to WebSocket endpoint
  2. Delivery
    Transmit crafted oversized CBOR stream
  3. Exploit
    Bypass equality bounds check in lecp_parse
  4. Execution
    Increment cbor_pos past buffer end
  5. Persist
    Write out-of-bounds into adjacent heap memory
  6. Impact
    Corrupt process memory for crash or code execution

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

The target application must be using libwebsockets 4.5.0 with LECP CBOR parsing enabled - specifically, the application code path must call lecp_parse() against attacker-supplied CBOR data, which requires that the LECP CBOR recording feature is compiled in and active. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms no authentication is required and no special attack preconditions exist beyond network reachability to a WebSocket endpoint that feeds data into lecp_parse. Applications that use libwebsockets exclusively for HTTP, standard WebSocket frames without CBOR payloads, or that validate CBOR input length before calling lecp_parse are not exposed through this code path. The primary limiting factor is functional - only deployments with LECP CBOR recording active are vulnerable.

Impact

The CVSS 4.0 score of 5.5 (Medium) reflects network reachability with no authentication or user interaction required (AV:N/AC:L/AT:N/PR:N/UI:N), but models only limited impact (VC:L/VI:L/VA:L/SC:N/SI:N/SA:N). These impact metrics may be conservative: uncontrolled out-of-bounds writes in C heap memory can produce outcomes ranging from reliable denial-of-service to remote code execution depending on allocator layout, adjacent structure content, and whether the attacker can influence heap state. The public POC (github.com/biniamf/pocs) elevates practical risk beyond the numeric score. The vulnerability is not present in the CISA KEV catalog, indicating no confirmed widespread active exploitation at time of analysis; exploitation appears limited and opportunistic rather than mass-scale. No EPSS score was included in the input data, so statistical exploitation probability cannot be quantified. The greatest real-world exposure lies in IoT and embedded deployments of libwebsockets where firmware update cycles are slow and LECP CBOR parsing is an active feature.

Exploit ScenarioDerived

An attacker connects to a network-exposed WebSocket endpoint of a server or IoT device running libwebsockets 4.5.0 with LECP CBOR parsing active and transmits a crafted CBOR byte stream engineered so that cbor_pos is incremented past sizeof(ctx->cbor) without triggering the equality-based flush. The out-of-bounds write corrupts adjacent heap memory; at minimum this causes a process crash (denial of service), and in favorable heap layouts where attacker-controlled bytes overwrite function pointers or allocator metadata, it may yield arbitrary code execution within the process. A public POC demonstrating the OOB write is available at https://github.com/biniamf/pocs/tree/main/libwebsockets-lecp-lecp_parse-cbor_pos_oob_write.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 24, 2026

Out-of-bounds write in warmcat libwebsockets 4.5.0 allows remote unauthenticated attackers to corrupt process memory by submitting crafted CBOR-encoded data to any network-accessible endpoint using the LECP CBOR parser. The root cause is a dual defect in lecp_parse and report_raw_cbor within lib/misc/lecp.c: an equality-only bounds check (== sizeof(ctx->cbor)) fails to catch cases where cbor_pos has already exceeded the buffer limit, and cbor_pos was reset after rather than before the flush callback, creating a window for sequential over-increment. No public exploit identified as confirmed active exploitation (CISA KEV), but a public proof-of-concept is confirmed at the referenced GitHub repository, and a patch commit has been issued upstream.

RemediationAI

Apply upstream patch commit 1d44554a1bb262db63ff4e240152a9deecd99054 from the warmcat/libwebsockets repository (https://github.com/warmcat/libwebsockets/commit/1d44554a1bb262db63ff4e240152a9deecd99054). A formally tagged release version incorporating this fix has not been independently confirmed from available input data - downstream consumers and package maintainers should verify whether a patched release has been published at https://github.com/warmcat/libwebsockets/ before declaring remediation complete; building and deploying directly from the patched commit is an option where release cadence is slow. If patching is not immediately feasible, disable LECP CBOR recording functionality at compile time or application configuration level if the feature is not required - this removes the vulnerable code path entirely with no side effects for applications using only HTTP or non-CBOR WebSocket protocols. As a network-level control, restrict access to WebSocket endpoints accepting CBOR data to trusted IP ranges; this reduces exposure but does not eliminate the vulnerability for applications with legitimate external users. Enabling AddressSanitizer in staging builds can detect exploitation attempts during testing, though it is not suitable for production deployments.

Affected VersionsENISA

libwebsockets 4.5.0

Affected Packages

euvd libwebsockets no fix

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

libwebsockets (warmcat/libwebsockets) is a lightweight C library implementing WebSocket (RFC 6455) and HTTP/2, widely embedded in IoT firmware and server-side event-driven applications. The vulnerable component is the LECP (Lightweight Event-Callback Protocol) CBOR (Concise Binary Object Representation, RFC 7049) parser in lib/misc/lecp.c. CWE-787 (Out-of-Bounds Write) is triggered by two interacting defects: (1) in lecp_parse, the flush check ctx->cbor_pos == sizeof(ctx->cbor) uses strict equality, so if cbor_pos is incremented past the fixed-size ctx->cbor[] array boundary without exactly equaling the limit, no flush is triggered and subsequent CBOR bytes are written out-of-bounds; (2) in report_raw_cbor, cbor_pos was reset to 0 after the callback fired rather than before, creating a re-entrant window during which additional increments could push the position further past the boundary. The upstream fix (commit 1d44554a1bb262db63ff4e240152a9deecd99054) corrects both: reset cbor_pos before the callback and change the condition to >=. Confirmed affected CPE: cpe:2.3:a:warmcat:libwebsockets:*:*:*:*:*:*:*:*, version 4.5.0.

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

Vendor (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 7.3 HIGH

Network-reachable CBOR parse path requires no auth; C/I/A limited to Low as heap corruption impact depends on layout.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Red Hat 7.3 HIGH

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Aug 24, 2026 - 01:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
CVE Published
Aug 24, 2026 - 00:45 cve.org
MEDIUM 5.5

DescriptionCVE.org

A vulnerability was found in warmcat libwebsockets 4.5.0. Impacted is the function report_raw_cbor of the file lib/misc/lecp.c of the component LECP CBOR Recording. The manipulation results in out-of-bounds write. The attack can be launched remotely. The exploit has been made public and could be used. The patch is identified as 1d44554a1bb262db63ff4e240152a9deecd99054. It is best practice to apply a patch to resolve this issue.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
WebSocket C library common in IoT and embedded firmware
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: +20
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.

Vendor StatusVendor

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