Live Exposure Defense: From CVE to Confirmed Exposure in 12 Hours – See more

New CVE Detected

CVE-2026-50161 – Heap Buffer Overflow (RCE/DoS) – baresip libre (re) < 4.8.1

Be the first to know when new zero-days emerge:

Summary

CVE-2026-50161 is a critical integer overflow vulnerability (CWE-190/CWE-787) in the websock_decode() function of libre (the re library used by the baresip SIP user-agent project), affecting all versions prior to 4.8.1. The flaw allows an unauthenticated remote attacker to send a crafted WebSocket frame that triggers a heap buffer overflow, resulting in denial of service or potential remote code execution against any application that accepts WebSocket connections via websock_accept() or websock_accept_proto(). The vulnerability carries a CVSS v4.0 base score of 9.3 (Critical).

Technical details

  • Root cause: When decoding a masked WebSocket frame that uses the 64-bit extended payload-length encoding, websock_decode() in src/websock/websock.c performs the bounds check mbuf_get_left(mb) < (4 + hdr->len). If hdr->len is close to UINT64_MAX, the addition 4 + hdr->len wraps around to a small value, causing the length validation to incorrectly pass.
  • Trigger conditions: A single, small (~14-byte) crafted, masked WebSocket frame with an oversized 64-bit extended length field is sufficient to trigger the flaw.
  • Attack vector: Network-based and pre-authentication — the attacker only needs to complete a standard HTTP-to-WebSocket handshake with any service built on libre‘s WebSocket server functionality; no credentials or user interaction are required.
  • Impact: Once the bogus length check passes, the subsequent XOR-based unmasking routine iterates far beyond the allocated buffer, writing attacker-influenced data out of bounds. This can crash the process (denial of service) or, depending on heap layout, be leveraged for memory corruption/remote code execution.

Affected software

  • baresip re (libre) library — all versions prior to 4.8.1
  • Any application embedding libre’s WebSocket server code path (websock_accept() / websock_accept_proto()) is exposed, including baresip-based SIP/VoIP deployments that expose a WebSocket listener.

Severity

  • CVSS v4.0 Base Score: 9.3 (Critical)
  • 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

Mitigation and recommended actions

  • Immediate: Upgrade libre/re to version 4.8.1 or later, which adds an explicit overflow guard (hdr->len > SIZE_MAX - 4) before the vulnerable addition, fixed via commit 718b92615c7963670d26c1a2b246968b58d782e8 (PR #1584).
  • If immediate patching is not possible:
    • Restrict or firewall network access to any WebSocket listener exposed by baresip/libre-based services to trusted networks only.
    • Disable WebSocket transport support in baresip/libre deployments if it is not required for operation.
    • Monitor for abnormal crashes or memory errors in processes using libre’s WebSocket server, which may indicate exploitation attempts.

References

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

How IONIX’s External Exposure Management Platform Detects and Validates
Zero-Days to Shrink MTTR

1

Map your entire attack surface (continously)

IONIX uses multi-factor discovery methods, including DNS analysis, certificate mapping, metadata inspection, and more, to automatically map every internet-facing asset across your environment. This includes cloud instances, third-party platforms, shadow IT, and even forgotten infrastructure that traditional tools miss.

2

Monitor for new CVEs

Dozens of threat intel feeds using agentic technology are continuously analyzed to detect the appearance of proof-of-concept code, exploit kits, and indicators of active targeting. IONIX goes further by applying AI to proactively evaluate whether emerging vulnerabilities are likely to be exploited, even before PoCs go public.

3

Identify Potential External Exposures

Not all CVEs matter. IONIX filters vulnerabilities by asking attacker-centric questions: Can it be reached from the internet? Does it require authentication? Is it being exploited in the wild? This dramatically reduces noise and focuses teams on threats that can actually be weaponized.

4

Create Safe, Scalable Exploit Validations

IONIX transforms real-world PoCs into safe, non-intrusive test payloads that can be run in production environments without disruption. These simulations are precisely targeted to the systems that are vulnerable, ensuring rapid validation without unnecessary load.

5

Execute Exploit Validations

By combining context about software stack, versioning, exposure status, and reachability, IONIX ensures that only the right payloads are executed against the right assets, maximizing efficiency and minimizing risk.

6

Drive Fast and Actionable Remediation

Results are routed through integrations with ticketing, SOAR, and SIEM tools. Issues are written in plain language, bundled into remediation clusters, and prioritized based on asset criticality, exploitability, and blast radius. This shortens mean time to remediation (MTTR) and empowers teams to act with confidence.

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

Subscribe to Threat Center RSS

Copy/paste the link below into your preferred RSS reader or follow these instructions to subscribe to Slack alerts.

Get Real-Time CVE Alerts to Your Email

Be the first to know when new zero-days emerge