CVE-2026-50161: CWE-190: Integer Overflow or Wraparound in baresip re
An integer overflow vulnerability exists in the websock_decode() function of the baresip re library prior to version 4.8.1. This occurs when validating masked WebSocket frames using 64-bit extended length encoding, allowing an overflow that leads to heap buffer overflow. Exploitation can cause heap corruption or denial of service after the WebSocket upgrade 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. Specifically, the expression 4 + hdr->len can wrap around when hdr->len approaches UINT64_MAX, bypassing the mbuf_get_left() bounds check. This leads to a heap buffer overflow during the XOR unmasking loop of masked WebSocket frames with 64-bit extended length encoding. Applications using websock_accept() or websock_accept_proto() to implement WebSocket servers are affected. Successful exploitation can result in attacker-controlled heap corruption or denial of service following the HTTP WebSocket upgrade handshake. The vulnerability is addressed in version 4.8.1.
Potential Impact
An attacker can exploit this vulnerability to cause heap corruption or denial of service in applications using the affected baresip re library versions. This can lead to application crashes or potentially allow further exploitation due to corrupted memory. The vulnerability affects WebSocket server implementations that use websock_accept() or websock_accept_proto().
Mitigation Recommendations
Upgrade to baresip re version 4.8.1 or later, where this integer overflow and heap buffer overflow vulnerability has been fixed. No other mitigation or temporary workaround is indicated.
CVE-2026-50161: CWE-190: Integer Overflow or Wraparound in baresip re
Description
An integer overflow vulnerability exists in the websock_decode() function of the baresip re library prior to version 4.8.1. This occurs when validating masked WebSocket frames using 64-bit extended length encoding, allowing an overflow that leads to heap buffer overflow. Exploitation can cause heap corruption or denial of service after the WebSocket upgrade handshake. The issue is fixed in version 4.8.1.
CVSS v4.0
Score 9.3critical
Affected software
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. Specifically, the expression 4 + hdr->len can wrap around when hdr->len approaches UINT64_MAX, bypassing the mbuf_get_left() bounds check. This leads to a heap buffer overflow during the XOR unmasking loop of masked WebSocket frames with 64-bit extended length encoding. Applications using websock_accept() or websock_accept_proto() to implement WebSocket servers are affected. Successful exploitation can result in attacker-controlled heap corruption or denial of service following the HTTP WebSocket upgrade handshake. The vulnerability is addressed in version 4.8.1.
Potential Impact
An attacker can exploit this vulnerability to cause heap corruption or denial of service in applications using the affected baresip re library versions. This can lead to application crashes or potentially allow further exploitation due to corrupted memory. The vulnerability affects WebSocket server implementations that use websock_accept() or websock_accept_proto().
Mitigation Recommendations
Upgrade to baresip re version 4.8.1 or later, where this integer overflow and heap buffer overflow vulnerability has been fixed. No other mitigation or temporary workaround is 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
- Remediation Level
- null
Threat ID: 6a849ec5c6e8be0332910971
Added to database: 08/18/2026, 18:04:53 UTC
Last enriched: 08/18/2026, 18:19:35 UTC
Last updated: 08/18/2026, 18:33:55 UTC
Views: 7
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.