Skip to main content
Vulnerability Database/CVE-2024-35190

CVE-2024-35190: Sangoma Asterisk Auth Bypass Vulnerability

CVE-2024-35190 is an authentication bypass flaw in Sangoma Asterisk that causes all unauthorized SIP requests to be incorrectly identified as valid PJSIP endpoints. This post covers the technical details, affected versions, security impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-35190 Overview

Asterisk is an open source private branch exchange (PBX) and telephony toolkit widely deployed in VoIP infrastructure. CVE-2024-35190 affects Asterisk version 18.23.0 and related 20.8.0 and 21.3.0 releases. After the upgrade to 18.23.0, all unauthorized Session Initiation Protocol (SIP) requests are incorrectly identified as a PJSIP endpoint of the local Asterisk server. This incorrect authentication behavior maps to [CWE-303: Incorrect Implementation of Authentication Algorithm]. The issue is fixed in Asterisk 18.23.1, 20.8.1, and 21.3.1.

Critical Impact

Unauthenticated SIP requests reaching a vulnerable Asterisk server are misidentified as a trusted local PJSIP endpoint, enabling unauthorized access to telephony functions.

Affected Products

  • Sangoma Asterisk 18.23.0
  • Sangoma Asterisk 20.8.0
  • Sangoma Asterisk 21.3.0

Discovery Timeline

  • 2024-05-17 - CVE-2024-35190 published to NVD
  • 2024-05-17 - Fix committed in Asterisk repository (commit 85241bd22936cc15760fd1f65d16c98be7aeaf6d)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-35190

Vulnerability Analysis

The vulnerability resides in the res_pjsip_endpoint_identifier_ip module, which was extended in 18.23.0 to allow endpoints to be identified by the transport they arrived on. The feature introduced a regression in endpoint identification logic. When Asterisk processes an inbound SIP request, the transport-based identifier incorrectly matches arbitrary unauthenticated requests to a local PJSIP endpoint. The result: SIP traffic that should be rejected is instead attributed to a trusted endpoint identity. This gives external callers the privileges associated with that local endpoint, including the ability to invoke dialplan functionality that was intended to be gated behind authentication.

Root Cause

The root cause is the transport attribute added to ps_endpoint_id_ips and the corresponding identify_by=transport option in the sample PJSIP configuration. The identifier module treated the transport binding as a sufficient authentication signal, bypassing the intended per-endpoint checks. The upstream remediation reverts the schema change (migration bd9c5159c7ea) and removes the transport-based identification sample from configs/samples/pjsip.conf.sample.

Attack Vector

Exploitation requires only network reach to the SIP service, typically UDP or TCP on port 5060. No authentication, user interaction, or privileged position is needed. An attacker sends a crafted SIP request to the Asterisk server; the request is accepted and processed as if it originated from a configured PJSIP endpoint.

python
# Patch excerpt: Alembic migration reverting the transport column
# Source: https://github.com/asterisk/asterisk/commit/85241bd22936cc15760fd1f65d16c98be7aeaf6d
"""Revert d5122576cca8 add transport attribute to identify

Revision ID: bd9c5159c7ea
Revises: 6c475a93f48a
Create Date: 2024-05-17 08:30:58.299083
"""

# revision identifiers, used by Alembic.
revision = 'bd9c5159c7ea'
down_revision = '6c475a93f48a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_column('ps_endpoint_id_ips', 'transport')


def downgrade():
    op.add_column('ps_endpoint_id_ips', sa.Column('transport', sa.String(128)))

The sample configuration block demonstrating identify_by=transport was also removed from configs/samples/pjsip.conf.sample as part of the same commit.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2024-35190

Indicators of Compromise

  • SIP call detail records (CDR) showing successful call setup from source IP addresses that are not configured as endpoints.
  • Asterisk logs attributing inbound requests to a local PJSIP endpoint without a matching registration or digest authentication exchange.
  • Presence of identify_by=transport in pjsip.conf on hosts running Asterisk 18.23.0, 20.8.0, or 21.3.0.

Detection Strategies

  • Audit running Asterisk versions with asterisk -rx "core show version" and flag hosts at 18.23.0, 20.8.0, or 21.3.0.
  • Inspect PJSIP endpoint identification configuration using asterisk -rx "pjsip show endpoints" and look for endpoints identified solely by transport.
  • Correlate SIP INVITE sources against the known registered endpoint inventory to surface unauthenticated callers accepted by the server.

Monitoring Recommendations

  • Forward Asterisk full and messages logs to a central log platform and alert on authentication-bypass patterns.
  • Monitor outbound call volume and destinations for anomalies consistent with toll fraud, which is a common post-exploitation outcome against SIP infrastructure.
  • Track SIP traffic at the network layer and alert on INVITE requests from source addresses outside the expected trunking peers.

How to Mitigate CVE-2024-35190

Immediate Actions Required

  • Upgrade Asterisk to 18.23.1, 20.8.1, or 21.3.1 or later immediately.
  • Remove any identify_by=transport entries from pjsip.conf and restart the Asterisk service.
  • Restrict SIP service exposure to known trunking providers using host-based or perimeter firewall rules.

Patch Information

The fix is delivered in Asterisk 18.23.1, 20.8.1, and 21.3.1. The remediation reverts the transport-based identifier introduced in the prior release. See the GitHub Security Advisory GHSA-qqxj-v78h-hrf9, the upstream commit, and pull requests #600 and #602 for full technical detail.

Workarounds

  • Downgrade to Asterisk 18.22.x, 20.7.x, or 21.2.x if patching is not immediately feasible.
  • Enforce digest authentication on all PJSIP endpoints and remove reliance on transport-based identification.
  • Place Asterisk behind a Session Border Controller (SBC) or SIP-aware firewall that validates signaling against an allowlist of upstream peers.
bash
# Verify installed Asterisk version and reload PJSIP after removing identify_by=transport
asterisk -rx "core show version"
asterisk -rx "pjsip show endpoints"
asterisk -rx "module reload res_pjsip.so"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.