{"id":"CVE-2026-50161","aliases":["DEBIAN-CVE-2026-50161","EUVD-2026-61137","GHSA-hvxv-v2gp-v93h","UBUNTU-CVE-2026-50161"],"status":"published","title":"libre: Integer overflow in websock_decode() masked frame length check leads to heap buffer overflow","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-\u003elen can wrap when hdr-\u003elen 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.","severity":{"version":"4.0","score":9.3,"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00723,"percentile":0.54339,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-190","CWE-787"],"published":"2026-08-18T17:53:01Z","modified":"2026-10-28T11:16:36Z","fixes":[{"ecosystem":"Debian:14","package":"libre","fixed_in":["2.0.1-4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.0-1","1.1.0-2","2.0.1-1","2.0.1-1~exp1","2.0.1-1~exp2","2.0.1-2","2.0.1-3","2.0.1-4"]},{"source":"osv","ecosystem":"Debian:13","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.1-3","2.0.1-4"]},{"source":"osv","ecosystem":"Debian:14","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.1-4"}]}],"versions":["2.0.1-3"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.14-1","0.4.14-2","0.4.14-3","0.4.14-4"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.4-3ubuntu1","0.5.5-1ubuntu1","0.5.6-1ubuntu1","0.5.6-1ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.0-4"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.0-1","1.1.0-1build1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.0-1build2","1.1.0-1build3","1.1.0-1build4"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.1-3build1","2.0.1-3ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.1-3","2.0.1-3build1"]}],"products":[{"vendor":"baresip","product":"re"}],"references":[{"url":"https://github.com/baresip/re/security/advisories/GHSA-hvxv-v2gp-v93h","tags":["x_refsource_CONFIRM","advisory","report"]},{"url":"https://github.com/baresip/re/pull/1584","tags":["x_refsource_MISC","fix","report"]},{"url":"https://github.com/baresip/re/commit/718b92615c7963670d26c1a2b246968b58d782e8","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/baresip/re/releases/tag/v4.8.1","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50161.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50161","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-50161","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-50161","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-50161","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-50161","title":"libre: Integer overflow in websock_decode() masked frame length check leads to heap buffer overflow","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T17:53:01.696Z","modified":"2026-08-19T15:11:15.35Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical","assessor":"cna"}],"cwes":["CWE-190","CWE-787"],"updated_at":"2026-11-02T14:20:08.734143Z"}],"euvd":[{"id":"EUVD-2026-61137","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T17:53:01Z","modified":"2026-08-19T15:11:15Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"updated_at":"2026-11-02T18:01:44.906351Z"}],"nvd":[{"id":"CVE-2026-50161","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T18:17:53.38Z","modified":"2026-10-22T22:10:00.25Z","cvss":[{"version":"4.0","score":9.3,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"}],"cwes":["CWE-190","CWE-787"],"updated_at":"2026-11-02T14:12:38.976695Z"}],"osv":[{"id":"CVE-2026-50161","title":"libre: Integer overflow in websock_decode() masked frame length check leads to heap buffer overflow","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T17:53:01.696Z","modified":"2026-10-28T11:16:36.40169468Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"cwes":["CWE-190","CWE-787"],"updated_at":"2026-11-02T15:45:07.431113Z"},{"id":"DEBIAN-CVE-2026-50161","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T18:17:53.38Z","modified":"2026-10-24T05:01:23.525854803Z","cvss":[{"version":"4.0","score":9.3,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical"}],"updated_at":"2026-11-02T15:45:56.877408Z"},{"id":"UBUNTU-CVE-2026-50161","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-\u003elen can wrap when hdr-\u003elen 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.","status":"published","published":"2026-08-18T18:17:00Z","modified":"2026-10-17T12:58:32.553307733Z","cvss":[{"version":"4.0","score":9.3,"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","level":"critical"}],"updated_at":"2026-11-02T16:56:33.391918Z"}]}}
