{"id":"CVE-2026-50161","aliases":["CVE-2026-50161"],"related":[],"kind":"vulnerability","state":"published","title":"libre: Integer overflow in websock_decode() masked frame length check leads to heap buffer overflow","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"libre es una biblioteca genérica para comunicaciones en tiempo real con soporte de entrada y salida asíncrona. Antes de la 4.8.1, la función websock_decode() en src/websock/websock.c contiene un desbordamiento de entero al validar una trama WebSocket enmascarada que utiliza la codificación de longitud extendida de 64 bits. La expresión 4 + hdr  ->  len puede desbordarse cuando hdr  ->  len está cerca de UINT64_MAX, haciendo que la comprobación de límites de mbuf_get_left() pase. El bucle de desenmascaramiento XOR subsiguiente luego escribe más allá del búfer de montón. Las aplicaciones que utilizan websock_accept() o websock_accept_proto() para implementar un servidor WebSocket se ven afectadas, y la explotación puede causar corrupción de montón controlada por el atacante o denegación de servicio después del handshake de actualización HTTP WebSocket. Este problema está corregido en la versión 4.8.1.","source":"nvd"}],"published":"2026-08-18T17:53:01.696Z","modified":"2026-10-22T22:10:00.250Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"}],"cwes":["CWE-190","CWE-787"],"affected":[{"ranges":[{"version":"< 4.8.1","status":"affected"}],"vendor":"baresip","product":"re","source":"cvelist"}],"references":[{"url":"https://github.com/baresip/re/security/advisories/GHSA-hvxv-v2gp-v93h","tags":["x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/baresip/re/pull/1584","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/baresip/re/commit/718b92615c7963670d26c1a2b246968b58d782e8","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/baresip/re/releases/tag/v4.8.1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-19T15:11:03.181Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-50161","url":"https://www.cve.org/CVERecord?id=CVE-2026-50161","licence":"CVE Terms of Use","modified":"2026-08-19T15:11:15.350Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-50161","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50161","licence":"Public domain","modified":"2026-10-22T22:10:00.250Z"}],"updatedAt":"2026-11-25T22:59:33.536Z","epss":{"score":0.0053,"percentile":0.46292,"date":"2026-12-01T12:00:22.000Z"}}