libre is a generic library for real-time communications with asynchronous input and output support. Prior to 4.8.1, the websockdecode() 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 UINT64MAX, causing the mbufgetleft() bounds check to pass. The subsequent XOR unmasking loop then writes beyond the heap buffer. Applications using websockaccept() or websockaccept_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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-190",
"CWE-787"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50161.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-50161.json"
[
{
"target": {
"function": "websock_decode",
"file": "src/websock/websock.c"
},
"deprecated": false,
"source": "https://github.com/baresip/re/commit/718b92615c7963670d26c1a2b246968b58d782e8",
"id": "CVE-2026-50161-268399b0",
"signature_version": "v1",
"digest": {
"length": 1144.0,
"function_hash": "90791744945993249034159393964522523580"
},
"signature_type": "Function"
},
{
"target": {
"file": "src/websock/websock.c"
},
"deprecated": false,
"source": "https://github.com/baresip/re/commit/718b92615c7963670d26c1a2b246968b58d782e8",
"id": "CVE-2026-50161-8e345095",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"205653894276177882845976994735089349577",
"319107032716303536559689801603816600260",
"98417606615468948801619787221641535150",
"60674254189263708024869926526995698480"
]
},
"signature_type": "Line"
}
]
"2026-08-20T10:17:14Z"