Skip to main content

libre CVE-2026-50161

| EUVDEUVD-2026-61137 CRITICAL
Integer Overflow or Wraparound (CWE-190)
2026-08-18 security-advisories@github.com
9.3
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Reach exposed WebSocket endpoint
  2. Delivery
    Complete HTTP WebSocket upgrade handshake
  3. Exploit
    Send masked frame with 64-bit length near UINT64_MAX
  4. Execution
    Overflow bypasses mbuf_get_left bounds check
  5. Persist
    XOR unmasking writes past heap buffer
  6. Impact
    Heap corruption or process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application uses libre's WebSocket server functionality via websock_accept() or websock_accept_proto() and that the attacker can reach that endpoint and complete the HTTP WebSocket upgrade handshake. The specific trigger is a masked WebSocket frame using the 64-bit extended payload length encoding with hdr->len set close to UINT64_MAX so that 4 + hdr->len wraps. No authentication is required (PR:N) and no user interaction is needed (UI:N); the frame must be a masked frame (as sent by clients to a server). Limiting factors: only applications acting as WebSocket servers with libre versions before 4.8.1 are affected, and the endpoint must be network-reachable by the attacker - deployments that do not expose a libre WebSocket server, or that gate the endpoint behind authentication/proxy validation, are not directly exploitable.

Impact

All primary signals point the same direction and are consistent: the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H, base 9.3 Critical) describes a network-reachable, low-complexity, unauthenticated flaw with high impact to confidentiality, integrity and availability, matching a description of attacker-controlled heap corruption or DoS reachable by any client that completes a WebSocket upgrade. There is no CISA KEV listing and no evidence of a public proof-of-concept in the provided data, so active exploitation is not indicated; EPSS and SSVC data were not provided. The realistic near-term risk is denial of service (heap corruption reliably crashes the process), while reliable remote code execution from a heap overwrite is plausible but harder and heap-layout dependent - the high I/C ratings reflect worst-case potential rather than a demonstrated code-execution exploit. This is a genuine patch priority for anyone exposing a libre-based WebSocket server, but the absence of KEV/POC suggests it is not yet under mass exploitation. No conflicting signals were observed; missing data are EPSS, SSVC and POC status.

Exploit ScenarioDerived

An attacker connects to an internet-exposed service built on libre, completes the standard HTTP-to-WebSocket upgrade handshake, then sends a single masked WebSocket frame declaring a 64-bit extended length near UINT64_MAX. The integer overflow bypasses the bounds check and the unmasking loop writes past the heap buffer, crashing the service or corrupting adjacent heap allocations; no authentication or user interaction is required (AV:N/AC:L/PR:N/UI:N). No public exploit code was identified in the provided data.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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 18, 2026

Heap buffer overflow in the baresip 'libre' real-time communications library (versions prior to 4.8.1) lets remote attackers corrupt heap memory or crash any application running a WebSocket server via websock_accept()/websock_accept_proto(). The websock_decode() function miscalculates frame bounds for 64-bit extended-length masked frames, and the out-of-bounds XOR unmasking write is attacker-controlled. No public exploit identified at time of analysis, but the flaw is network-reachable and unauthenticated per the CVSS vector.

RemediationAI

Vendor-released patch: 4.8.1 - upgrade libre (baresip/re) to version 4.8.1 or later, which adds the 'hdr->len > SIZE_MAX - 4' overflow guard (commit 718b92615c7963670d26c1a2b246968b58d782e8, PR https://github.com/baresip/re/pull/1584, advisory https://github.com/baresip/re/security/advisories/GHSA-hvxv-v2gp-v93h, release https://github.com/baresip/re/releases/tag/v4.8.1); downstream projects that statically or dynamically link libre must rebuild against the patched library. If immediate upgrade is impossible, the practical compensating control is to restrict network reachability of the WebSocket endpoint - place it behind an authenticating reverse proxy or WAF that terminates and re-validates WebSocket frames, or firewall the listening port to trusted clients only - accepting the trade-off that this breaks any legitimate untrusted/public WebSocket access; disabling the WebSocket server feature entirely removes the exposure where the feature is not required.

Affected VersionsENISA

re < 4.8.1

Affected Packages

euvd re fix: 4.8.1

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

libre (baresip/re) is a widely used C library for real-time communications (SIP/VoIP/WebRTC signaling and transport) that includes a WebSocket implementation in src/websock/websock.c. The root cause is CWE-190 (Integer Overflow or Wraparound): when a masked WebSocket frame uses the 64-bit extended payload length encoding, hdr->len is a 64-bit value read directly from the wire. The bounds check 'mbuf_get_left(mb) < (4 + hdr->len)' computes 4 + hdr->len in unsigned 64-bit arithmetic, so a hdr->len near UINT64_MAX wraps to a tiny value, making the check pass despite there being no real data. The 4 accounts for the 4-byte masking key. The subsequent XOR unmasking loop then reads/writes past the end of the heap-allocated mbuf. The fix (commit 718b9261, PR #1584) adds an explicit guard 'hdr->len > SIZE_MAX - 4' before the addition so the overflow can no longer bypass the length validation.

Know when the next one hits your stack

  • 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 (github) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.8 CRITICAL

Unauthenticated network-reachable frame after a public WebSocket handshake gives AV:N/AC:L/PR:N/UI:N; attacker-controlled heap corruption supports C/I/A:H with unchanged scope.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

2
Patch available
Aug 18, 2026 - 19:04 EUVD
CVE Published
Aug 18, 2026 - 18:17 cve.org
CRITICAL 9.3

DescriptionCVE.org

libre is a generic library for real-time communications with asynchronous input and output support. Prior to 4.8.1, the websock_decode() function in src/websock/websock.c contains an integer overflow when validating a masked WebSocket frame that uses the 64-bit extended length encoding. The expression 4 + hdr->len can wrap when hdr->len is close to UINT64_MAX, causing the mbuf_get_left() bounds check to pass. The subsequent XOR unmasking loop then writes beyond the heap buffer. Applications using websock_accept() or websock_accept_proto() to implement a WebSocket server are affected, and exploitation can cause attacker-controlled heap corruption or denial of service after the HTTP WebSocket upgrade handshake. This issue is fixed in version 4.8.1.

Executive ViewAI

Why It Matters

Baresip 'libre' real-time communications library (versions prior to 4.8.1) contains a critical vulnerability allowing remote attackers to crash services or corrupt memory through WebSocket requests without any authentication required. Organizations running applications or services that embed this library face immediate availability risk, with potential service outages affecting customer communications infrastructure. The lack of a vendor patch means current deployments have no available remediation path.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: disabling WebSocket server components where operationally feasible; network-level restrictions limiting WebSocket connections to internal/whitelisted sources only; strict rate limiting on WebSocket connection attempts; application monitoring and alerting for unexpected crashes or process restarts; blocking requests with malformed extended-length WebSocket frames at perimeter security controls.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche real-time comms C library, mainly used by baresip VoIP stack
Data Quality
5 sources
Confidence: Medium

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.4%
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
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

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

Attack Technique

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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