{"id":"CVE-2026-40614","aliases":["CVE-2026-40614"],"related":[],"kind":"vulnerability","state":"published","title":"PJSIP: Heap buffer overflow in Opus codec decoding","summary":"PJSIP is a free and open source multimedia communication library written in C. In 2.16 and earlier, there is a buffer overflow when decoding Opus audio frames due to insufficient buffer size validation in the Opus codec decode path. The FEC decode buffers (dec_frame[].buf) were allocated based on a PCM-derived formula: (sample_rate/1000) * 60 * channel_cnt * 2. At 8 kHz mono this yields only 960 bytes, but codec_parse() can output encoded frames up to MAX_ENCODED_PACKET_SIZE (1280) bytes via opus_repacketizer_out_range(). The three pj_memcpy() calls in codec_decode() copied input->size bytes without bounds checking, causing a heap buffer overflow.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PJSIP is a free and open source multimedia communication library written in C. In 2.16 and earlier, there is a buffer overflow when decoding Opus audio frames due to insufficient buffer size validation in the Opus codec decode path. The FEC decode buffers (dec_frame[].buf) were allocated based on a PCM-derived formula: (sample_rate/1000) * 60 * channel_cnt * 2. At 8 kHz mono this yields only 960 bytes, but codec_parse() can output encoded frames up to MAX_ENCODED_PACKET_SIZE (1280) bytes via opus_repacketizer_out_range(). The three pj_memcpy() calls in codec_decode() copied input->size bytes without bounds checking, causing a heap buffer overflow.","source":"cvelist"},{"lang":"es","text":"PJSIP es una biblioteca de comunicación multimedia de código abierto y gratuita escrita en C. En 2.16 y versiones anteriores, existe un desbordamiento de búfer al decodificar tramas de audio Opus debido a una validación insuficiente del tamaño del búfer en la ruta de decodificación del códec Opus. Los búferes de decodificación FEC (dec_frame[].buf) se asignaron basándose en una fórmula derivada de PCM: (sample_rate/1000) * 60 * channel_cnt * 2. A 8 kHz mono, esto produce solo 960 bytes, pero codec_parse() puede generar tramas codificadas de hasta MAX_ENCODED_PACKET_SIZE (1280) bytes a través de opus_repacketizer_out_range(). Las tres llamadas a pj_memcpy() en codec_decode() copiaron input -> size bytes sin verificación de límites, causando un desbordamiento de búfer de pila.","source":"nvd"}],"published":"2026-04-21T18:04:15.159Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-122"],"affected":[{"ranges":[{"version":"<= 2.16","status":"affected"}],"vendor":"pjsip","product":"pjproject","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"2.17"}],"vendor":"pjsip","product":"pjsip","cpe":"cpe:2.3:a:pjsip:pjsip:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/pjsip/pjproject/security/advisories/GHSA-j59p-4xrr-fp8g","tags":["patch","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/pjsip/pjproject/commit/17897e835818f8ee03b1806ddcd7b95ea16d2c0e","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-22T13:32:43.106Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40614","url":"https://www.cve.org/CVERecord?id=CVE-2026-40614","licence":"CVE Terms of Use","modified":"2026-04-22T13:33:23.816Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40614","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40614","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.130Z","epss":{"score":0.00233,"percentile":0.15201,"date":"2026-12-01T12:00:22.000Z"}}