Skip to main content

PJSIP CVE-2026-40614

| EUVDEUVD-2026-24229 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-04-21 GitHub_M
8.5
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker crafts malicious Opus audio
  2. Delivery
    User initiates/receives VoIP call or opens audio file
  3. Exploit
    PJSIP codec_parse() generates 1280-byte frame
  4. Install
    codec_decode() calls pj_memcpy() without bounds check
  5. C2
    Heap buffer overflow corrupts adjacent memory
  6. Execute
    Attacker overwrites function pointers or heap metadata
  7. Impact
    Execute arbitrary code as application user
  8. Step 8
    Establish persistence or exfiltrate sensitive data

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target PJSIP application to have Opus codec support enabled (typically enabled by default in builds with Opus library integration) and process audio data from an attacker-controlled source. The user must interact with the malicious media by accepting a VoIP call, playing an audio file, or joining a conference with the crafted Opus stream (CVSS UI:P requirement). The vulnerability affects both real-time RTP stream processing and file-based audio decoding scenarios. Local access (AV:L) is required, meaning the attacker must deliver the malicious audio through mechanisms available to local users or applications, such as opening a crafted file, connecting to a malicious SIP server, or receiving a call from an attacker-controlled endpoint. The attack succeeds against default PJSIP configurations without requiring elevated privileges (PR:N), though the ultimate impact depends on the privileges of the running VoIP application process.

Impact

Real-world risk is moderate despite the high CVSS 8.5 score. The CVSS:4.0 vector (AV:L/AC:L/PR:N/UI:P) indicates local attack vector with user interaction required, significantly limiting exploitability compared to network-based vulnerabilities. An attacker must convince a user to process a malicious audio file or stream, making this unsuitable for automated mass exploitation. No EPSS score, KEV listing, or public proof-of-concept is documented in available data, suggesting exploitation has not been observed in the wild. However, the technical details in the GitHub advisory are sufficiently precise for exploit development by skilled attackers. The heap overflow primitive could enable code execution with the privileges of the PJSIP application process, potentially compromising VoIP clients, SIP servers, or embedded devices. Organizations using PJSIP for processing untrusted audio sources (media gateways, conference bridges, recording systems) face elevated risk. The availability of a specific GitHub commit fix (17897e8) indicates vendor acknowledgment and remediation path. Priority should be medium-to-high for internet-facing VoIP infrastructure, lower for internal-only deployments with trusted media sources.

Exploit ScenarioDerived

An attacker crafts a malicious Opus-encoded audio file or RTP stream with packet sizes approaching the 1280-byte maximum. When a user initiates or receives a VoIP call using an affected PJSIP-based application (or processes a malicious audio file), the codec_decode() function copies the oversized encoded data into the 960-byte heap buffer, triggering a buffer overflow. By carefully controlling the overflow data, the attacker can overwrite adjacent heap structures to achieve arbitrary code execution with the privileges of the VoIP application, potentially installing backdoors, exfiltrating call recordings, or pivoting to other network resources. Public commit details provide sufficient technical information for exploit development.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 21, 2026

Heap buffer overflow in PJSIP 2.16 and earlier allows local attackers with user interaction to execute arbitrary code or crash the application via maliciously crafted Opus audio frames. The vulnerability stems from undersized FEC decode buffers (960 bytes at 8 kHz mono) that receive up to 1280 bytes of encoded data without bounds checking during Opus codec decoding. With CVSS 8.5 severity and a public GitHub commit fix available, this represents a high-impact memory corruption vulnerability in a widely-deployed VoIP library, though exploitation requires local access and user interaction (AV:L/UI:P), limiting remote attack scenarios.

RemediationAI

Upgrade to a patched version of PJSIP incorporating commit 17897e835818f8ee03b1806ddcd7b95ea16d2c0e from the upstream repository (https://github.com/pjsip/pjproject/commit/17897e835818f8ee03b1806ddcd7b95ea16d2c0e). The fix corrects buffer size calculations in the Opus codec decode path to prevent overflow conditions. If immediate patching is not feasible, implement the following compensating controls: disable Opus codec support in PJSIP configuration if alternative codecs are acceptable (trade-off: reduced audio quality and increased bandwidth usage), restrict media processing to trusted sources only through SIP access control lists and authenticated sessions (trade-off: limits functionality for guest/anonymous users), or deploy application sandboxing with restricted process privileges to contain potential exploitation impact (trade-off: may affect interoperability with system resources). Monitor the GitHub advisory page for official release version numbers as the patch transitions from commit to stable release. Prioritize systems processing media from untrusted or internet-facing sources.

Affected VersionsENISA

pjproject ≤ 2.16

Affected Packages

euvd pjproject no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PJSIP (pjproject) is a multimedia communication library implementing SIP, SDP, RTP, STUN, TURN, and ICE protocols, widely used in VoIP applications, softphones, and embedded systems. The vulnerability affects the Opus audio codec integration layer where Forward Error Correction (FEC) decode buffers are allocated. The root cause (CWE-122: Heap-based Buffer Overflow) occurs because buffer sizing logic incorrectly calculates capacity based on PCM output requirements using the formula (sample_rate/1000) * 60 * channel_cnt * 2, yielding only 960 bytes for 8 kHz mono audio. However, the codec_parse() function can produce encoded packets up to MAX_ENCODED_PACKET_SIZE (1280 bytes) via opus_repacketizer_out_range(). Three unchecked pj_memcpy() operations in codec_decode() then copy input->size bytes directly into the undersized heap buffers, creating a 320-byte overflow condition. This classic integer truncation and buffer sizing mismatch affects any PJSIP deployment processing Opus-encoded audio streams.

Know when Pjsip gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.5 HIGH
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

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Apr 21, 2026 - 19:22 NVD
8.5 (HIGH)
CVE Published
Apr 21, 2026 - 18:04 nvd
HIGH 8.5

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

PJSIP versions 2.16 and earlier contain a heap buffer overflow in Opus audio frame processing that allows local attackers to execute arbitrary code or crash VoIP applications through maliciously crafted audio files. Organizations using PJSIP in production VoIP systems, SIP clients, or embedded communications platforms face code execution risk when users interact with untrusted audio sources, with potential for lateral movement or system compromise depending on application privileges.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable Opus codec support if not operationally required; (2) restrict audio file ingestion to authenticated, trusted internal sources only; (3) run PJSIP-dependent applications with minimal user privileges; (4) implement application-level sandboxing to contain potential code execution impact; (5) monitor for application crashes or unexpected process behavior as potential exploit indicators.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

More in Pjsip

View all
CVE-2021-43845 CRITICAL POC
9.1 Dec 27

PJSIP is a free and open source multimedia communication library. Rated critical severity (CVSS 9.1), this vulnerability

CVE-2021-21375 MEDIUM POC
6.5 Mar 10

PJSIP is a free and open source multimedia communication library written in C language implementing standard based proto

CVE-2017-16872 CRITICAL
9.8 Nov 17

An issue was discovered in Teluu pjproject (pjlib and pjlib-util) in PJSIP before 2.7.1. Rated critical severity (CVSS 9

CVE-2026-25994 CRITICAL POC
9.8 Feb 11

Buffer overflow in PJSIP multimedia library version 2.16 and earlier in PJNATH ICE implementation. Patch available. Affe

CVE-2026-32945 CRITICAL
9.8 Mar 20

Heap overflow in PJSIP 2.16 and earlier DNS parser allows unauthenticated remote attackers to achieve code execution wit

CVE-2023-38703 CRITICAL
9.8 Oct 06

PJSIP is a free and open source multimedia communication library written in C with high level API in C, C++, Java, C#, a

CVE-2022-23547 CRITICAL
9.8 Dec 23

PJSIP is a free and open source multimedia communication library written in C language implementing standard based proto

CVE-2022-23537 CRITICAL
9.8 Dec 20

PJSIP is a free and open source multimedia communication library written in C language implementing standard based proto

CVE-2022-39244 CRITICAL
9.8 Oct 06

PJSIP is a free and open source multimedia communication library written in C. Rated critical severity (CVSS 9.8), this

CVE-2022-31031 CRITICAL
9.8 Jun 09

PJSIP is a free and open source multimedia communication library written in C language implementing standard based proto

CVE-2022-24786 CRITICAL
9.8 Apr 06

PJSIP is a free and open source multimedia communication library written in C. Rated critical severity (CVSS 9.8), this

CVE-2022-24754 CRITICAL
9.8 Mar 11

PJSIP is a free and open source multimedia communication library written in C language. Rated critical severity (CVSS 9.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy