CVE-2026-50161: CWE-190: Integer Overflow or Wraparound in baresip re
An integer overflow vulnerability exists in the baresip re library prior to version 4.8.1 in the websock_decode() function when processing masked WebSocket frames with 64-bit extended length encoding. This overflow can lead to heap buffer overflows during unmasking, potentially causing heap corruption or denial of service after the WebSocket handshake. The issue is fixed in version 4.8.1.
AI Analysis
Technical Summary
The baresip re library's websock_decode() function in src/websock/websock.c contains an integer overflow vulnerability prior to version 4.8.1. When validating a masked WebSocket frame using 64-bit extended length encoding, the expression '4 + hdr->len' can wrap around if hdr->len is near UINT64_MAX. This causes the bounds check mbuf_get_left() to incorrectly pass, leading to a heap buffer overflow during the XOR unmasking loop. Applications using websock_accept() or websock_accept_proto() to implement WebSocket servers are affected. Exploitation can result in attacker-controlled heap corruption or denial of service after the HTTP WebSocket upgrade handshake. The vulnerability is addressed in version 4.8.1.
Potential Impact
Exploitation of this vulnerability can cause heap buffer overflow leading to attacker-controlled heap corruption or denial of service in applications using the affected baresip re library versions. This occurs after the HTTP WebSocket upgrade handshake, impacting WebSocket server implementations that rely on websock_accept() or websock_accept_proto().
Mitigation Recommendations
This vulnerability is fixed in baresip re version 4.8.1. Users should upgrade to version 4.8.1 or later to remediate this issue. No additional mitigation steps are indicated.
CVE-2026-50161: CWE-190: Integer Overflow or Wraparound in baresip re
Description
An integer overflow vulnerability exists in the baresip re library prior to version 4.8.1 in the websock_decode() function when processing masked WebSocket frames with 64-bit extended length encoding. This overflow can lead to heap buffer overflows during unmasking, potentially causing heap corruption or denial of service after the WebSocket handshake. The issue is fixed in version 4.8.1.
CVSS v4.0
Score 9.3critical
Affected software
baresip
re
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The baresip re library's websock_decode() function in src/websock/websock.c contains an integer overflow vulnerability prior to version 4.8.1. When validating a masked WebSocket frame using 64-bit extended length encoding, the expression '4 + hdr->len' can wrap around if hdr->len is near UINT64_MAX. This causes the bounds check mbuf_get_left() to incorrectly pass, leading to a heap buffer overflow during the XOR unmasking loop. Applications using websock_accept() or websock_accept_proto() to implement WebSocket servers are affected. Exploitation can result in attacker-controlled heap corruption or denial of service after the HTTP WebSocket upgrade handshake. The vulnerability is addressed in version 4.8.1.
Potential Impact
Exploitation of this vulnerability can cause heap buffer overflow leading to attacker-controlled heap corruption or denial of service in applications using the affected baresip re library versions. This occurs after the HTTP WebSocket upgrade handshake, impacting WebSocket server implementations that rely on websock_accept() or websock_accept_proto().
Mitigation Recommendations
This vulnerability is fixed in baresip re version 4.8.1. Users should upgrade to version 4.8.1 or later to remediate this issue. No additional mitigation steps are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-03T20:54:20.432Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a849ec5c6e8be0332910971
Added to database: 08/18/2026, 18:04:53 UTC
Last enriched: 09/24/2026, 06:51:43 UTC
Last updated: 10/02/2026, 02:46:05 UTC
Views: 73
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.