Heap-based Buffer Overflow Affecting pjproject package, versions <2.17-r0


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.37% (28th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ALPINE324-PJPROJECT-17297875
  • published11 Jun 2026
  • disclosed21 Apr 2026

Introduced: 21 Apr 2026

CVE-2026-40614  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade Alpine:3.24 pjproject to version 2.17-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream pjproject package and not the pjproject package as distributed by Alpine. See How to fix? for Alpine:3.24 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1