CyberRota Analysis
AI-GeneratedThe vulnerability arises in the websock_decode() function of the libre library, where an integer overflow can occur during the validation of masked WebSocket frames, potentially leading to heap corruption. This flaw affects applications that utilize websock_accept() or websock_accept_proto() for WebSocket server implementations, allowing attackers to exploit the vulnerability for remote code execution or denial of service. Organizations using affected versions of the library should prioritize upgrading to version 4.8.1 to mitigate these critical risks.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
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.