CVE-2026-40614: CWE-122: Heap-based Buffer Overflow in pjsip pjproject
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.
AI Analysis
Technical Summary
The vulnerability in pjsip pjproject (<= 2.16) arises from a heap-based buffer overflow in the Opus codec decode path. The FEC decode buffers (dec_frame[].buf) are allocated using a formula derived from PCM parameters, resulting in insufficient buffer size (e.g., 960 bytes at 8 kHz mono). However, the codec_parse() function can output encoded frames up to 1280 bytes via opus_repacketizer_out_range(). The pj_memcpy() calls in codec_decode() copy input->size bytes without verifying buffer boundaries, causing a heap overflow. This is classified as CWE-122.
Potential Impact
Successful exploitation of this vulnerability could lead to memory corruption due to heap buffer overflow when decoding specially crafted Opus audio frames. This may result in application crashes or potentially allow execution of arbitrary code. The CVSS 4.0 score of 8.5 indicates high severity, with local attack vector, low attack complexity, no privileges required, and user interaction needed. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should consider avoiding use of vulnerable pjproject versions with untrusted Opus audio input. Monitoring vendor channels for updates is recommended.
CVE-2026-40614: CWE-122: Heap-based Buffer Overflow in pjsip pjproject
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in pjsip pjproject (<= 2.16) arises from a heap-based buffer overflow in the Opus codec decode path. The FEC decode buffers (dec_frame[].buf) are allocated using a formula derived from PCM parameters, resulting in insufficient buffer size (e.g., 960 bytes at 8 kHz mono). However, the codec_parse() function can output encoded frames up to 1280 bytes via opus_repacketizer_out_range(). The pj_memcpy() calls in codec_decode() copy input->size bytes without verifying buffer boundaries, causing a heap overflow. This is classified as CWE-122.
Potential Impact
Successful exploitation of this vulnerability could lead to memory corruption due to heap buffer overflow when decoding specially crafted Opus audio frames. This may result in application crashes or potentially allow execution of arbitrary code. The CVSS 4.0 score of 8.5 indicates high severity, with local attack vector, low attack complexity, no privileges required, and user interaction needed. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should consider avoiding use of vulnerable pjproject versions with untrusted Opus audio input. Monitoring vendor channels for updates is recommended.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-14T14:07:59.642Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e7c5ee19fe3cd2cdf0bac2
Added to database: 4/21/2026, 6:46:06 PM
Last enriched: 4/21/2026, 7:01:29 PM
Last updated: 4/22/2026, 7:36:57 AM
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.