LiveActive security incident?Get immediate response
CVE Record

CVE-2026-50161: libre: Integer overflow in websock_decode() masked frame length check leads to heap buffer overflow

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.

CriticalCVSS 9.3Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A remote attacker can send a specially sized masked WebSocket frame that bypasses a length check and corrupts heap memory. WebSocket servers built with affected libre/re versions may crash or experience attacker-controlled memory corruption. The sources do not establish code execution.

Executive priority

Treat as an immediate remediation priority for reachable WebSocket servers. The flaw is unauthenticated, network-accessible, and rated critical, although active exploitation is not evidenced. Rapidly inventory affected services, upgrade them, and temporarily restrict exposure where deployment cannot occur promptly.

Technical view

Before version 4.8.1, websock_decode() can overflow the calculation 4 + hdr->len for masked frames using 64-bit extended lengths. The wrapped value may pass the remaining-buffer check, after which the XOR unmasking loop writes beyond the heap buffer. This is classified as CWE-190 and CWE-787, with CVSS 4.0 score 9.3.

Likely exposure

Exposure is limited to applications using affected versions before 4.8.1 and websock_accept() or websock_accept_proto() as a WebSocket server. An attacker must reach the service and complete the HTTP WebSocket upgrade handshake. Client-only use is not identified as affected by the supplied sources.

Exploitation context

The vulnerability is remotely reachable, requires no privileges or user interaction, and has low attack complexity according to the supplied CVSS vector. The source bundle marks it absent from KEV and provides no evidence of active exploitation. Potential outcomes are denial of service and attacker-controlled heap corruption; practical code execution is not established.

Researcher notes

The critical condition depends on a masked frame using 64-bit extended length encoding and an hdr->len value that wraps the validation expression. Review should focus on integer-safe bounds validation before reading the mask and unmasking payload bytes. The supplied commit, pull request, advisory, and 4.8.1 release provide the authoritative fix trail.

Mitigation direction

  • Upgrade libre/re to version 4.8.1 or later.
  • Identify applications embedding vulnerable versions, including statically linked copies.
  • Prioritize internet-accessible WebSocket servers using the affected accept functions.
  • If immediate upgrading is impossible, restrict WebSocket access and consult vendor guidance.

Validation and detection

  • Confirm the deployed libre/re version is 4.8.1 or later.
  • Search source and dependency inventories for websock_accept() and websock_accept_proto().
  • Verify whether affected WebSocket listeners are reachable from untrusted networks.
  • Confirm rebuilt applications no longer include vulnerable static library copies.
  • Review service telemetry for unexplained crashes or memory-corruption indicators.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-190: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-787: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-50161 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.3 (4.0)
Known Exploited
No
Published

Vector: 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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
5Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.3CVSS 4.0CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N——GitHub_M

Vulnerability scoring details

Base CVSS 4.0 score

9.3Critical
CVSS 4.0 vector shape for CVE-2026-50161Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: 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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
baresipre< 4.8.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-190 · source CWE mapping

Integer Overflow or Wraparound

Integer Overflow or Wraparound represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-787 · source CWE mapping

Out-of-bounds Write

Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.