CVE-2026-52023
Executive Summary
CVE-2026-52023 is a denial-of-service (DoS) vulnerability affecting Kamailio, an open-source SIP (Session Initiation Protocol) server, in versions 6.1.1 and earlier. A remote, unauthenticated attacker can trigger a crash or resource exhaustion via the IMS Registrar PCSCF module, specifically through the pcscf_save_pending/save_pending code path and the security-agreement parsing routine in sec_agree.c (function parse_sec_agree()). Successful exploitation results in service disruption of SIP signaling infrastructure, impacting call routing, registration, and overall telephony operations. No patch is currently available, and no public exploit code has been observed in the wild.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability resides in Kamailio's IMS (IP Multimedia Subsystem) extension functionality, specifically within the ims_registrar_pcscf module. This module handles P-CSCF (Proxy-Call Session Control Function) registrar operations for IMS networks, managing SIP registration and security associations.
The flawed code path involves the pcscf_save_pending/save_pending functionality, which persists pending registration states, and the security-agreement parsing logic implemented in sec_agree.c within the parse_sec_agree() function. Security agreements in SIP/IMS use the Security-Client, Security-Server, and Security-Verify headers, containing parameters such as alg, ealg, q, prot, and mod. These headers follow RFC 3329 and are protected via the Sec-Agree mechanism.
The vulnerability mechanism is likely a memory corruption, NULL pointer dereference, or unbounded buffer access during the parsing of malformed security-agreement header values. When a remote attacker sends a crafted SIP message containing an invalid, oversized, or structurally malformed security agreement parameter to the P-CSCF module, the parse_sec_agree() function may mishandle the input, leading to a segmentation fault (crash) or memory exhaustion.
Given that this is an IMS-specific module path, the attack surface is limited to deployments explicitly configured with the IMS registrar module and P-CSCF functionality enabled — typically in carrier-grade VoIP and IMS core networks. Standard Kamailio deployments not using IMS extensions are unaffected.
The specific nature of the memory handling flaw cannot be determined from the description alone; insufficient technical detail is available to confirm whether this is a NULL pointer dereference, an out-of-bounds read, a buffer overflow, or an infinite loop. However, the crash vector is remote-triggerable without authentication, making it high-severity for affected IMS deployments.
Exploitation Scenarios
Note: No public PoC or exploit code is available; the attack chain is inferred from the vulnerability class and the NVD description.
Step 1 — Reconnaissance / Target Identification. An attacker scans for SIP endpoints, typically UDP or TCP port 5060, or TLS port 5061, on IP ranges belonging to telecommunication providers. SIP OPTIONS requests, which elicit a response from the server, are commonly used for host discovery. The attacker may fingerprint the server version using User-Agent headers in responses or via error messages to confirm Kamailio 6.1.1 or earlier is in use.
Step 2 — Flaw Trigger. The attacker constructs a SIP REGISTER or SIP SUBSCRIBE request that traverses the P-CSCF path. To reach the vulnerable code, the message must be processed by the ims_registrar_pcscf module, which requires appropriate routing logic (modparam and route blocks triggering the pcscf_save_pending function). The attacker crafts a Security-Client or Security-Verify header containing malformed parameters — for example, excessively long values, missing mandatory delimiters, invalid base64 encoding in alg parameters, or an incorrect number of semicolon-separated key/value pairs — that cause parse_sec_agree() in sec_agree.c to enter a faulty parsing branch.
Step 3 — Payload / Execution Method. At the vulnerability-class level, the malformed security-agreement header triggers a memory handling bug in the parser. This could manifest as:
- A NULL pointer dereference if the parser attempts to use an uninitialized structure member after a partial parse.
- An out-of-bounds read if the parser indexes into a buffer using a length derived from the attacker-controlled header without proper bounds checking.
- Excessive memory allocation if the parser tries to allocate based on an inflated attacker-supplied length value.
The result is a crash of the Kamailio worker process. Depending on Kamailio's process model, a single worker crash may be isolated, but a repeated barrage of such messages can exhaust all worker processes, causing complete service failure.
Step 4 — Post-Exploitation Impact. After successful exploitation, SIP registration and call routing services become unavailable. In an IMS core, this impacts all subscribers served by the affected P-CSCF instance. Repeated exploitation results in persistent DoS, requiring manual process restart or a full system reboot to restore service. If Kamailio runs in a stateful cluster, failover may mask the impact temporarily, but sustained attacks can take down all nodes. The attacker does not gain code execution, data access, or persistence — the impact is strictly availability.
Impact Assessment
Business Impact: For telecommunications providers and large enterprises running IMS-based VoIP infrastructures, this vulnerability enables remote, unauthenticated denial of service. The direct consequence is the loss of SIP signaling capabilities — subscribers cannot register, initiate, or receive calls. In-carrier environments, this constitutes a critical service availability impact potentially triggering regulatory breach-of-service obligations and SLA penalties.
Affected Systems: Kamailio versions up to and including 6.1.1, but only in configurations where the ims_registrar_pcscf module is loaded and the pcscf_save_pending/save_pending path is invoked. Standard Kamailio proxy deployments without IMS modules are not exposed.
Blast Radius: The vulnerability is remotely exploitable over the network without authentication. However, the exploit surface is bounded — the attacker must reach the SIP signaling interface of an IMS-configured deployment. This is typically public-facing (5060 UDP/TCP), though many operators restrict via ACLs or firewalls. The CVSS score is N/A (not yet assigned), but based on the described attack vector (remote, unauthenticated DoS), the likely CVSS 3.x base score would be in the 7.5 to 8.6 (High) range if formally scored (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). Operators should treat this as a high-severity availability risk for IMS-enabled deployments. EPSS scoring has not yet been published by FIRST.org.
Detection Guidance
Sigma Rule
title: Kamailio IMS Registrar PCSCF Security-Agreement DoS Attempt
id: 7f3c4d92-5a1e-4b6f-9d8c-3e2a1f0b6d4c
status: experimental
description: Detects malformed SIP Security-Client/Security-Verify headers targeting Kamailio ims_registrar_pcscf module that may trigger CVE-2026-52023 DoS.
author: Valtersit Threat Intelligence
date: 2026/06/17
logsource:
category: application
product: kamailio
service: sip
detection:
selection_sip_method:
sip.method:
- REGISTER
- SUBSCRIBE
selection_sec_headers:
sip.header.security_client|contains:
- 'alg='
- 'ealg='
- 'prot='
- 'mod='
- 'q='
selection_anomaly:
- sip.header.security_client|re: '([a-zA-Z]+=[^;\\s,]{500,})'
- sip.header.security_client|re: 'alg=[^,\\s]{100,}'
- sip.header.security_server|re: '([a-zA-Z]+=[^;\\s,]{500,})'
- sip.header.security_verify|re: '([a-zA-Z]+=[^;\\s,]{500,})'
- sip.header.security_client|contains: ';;'
condition: selection_sip_method and selection_sec_headers and selection_anomaly
timeframe: 5m
level: high
falsepositives:
- Rare malformed SIP clients with broken security agreement implementations
- SIP fuzzing tools in lab environments
fields:
- src_ip
- dst_ip
- sip.user_agent
tags:
- attack.t1499
- attack.t1499.004
- cve.2026-52023
- kamailio
YARA Rule
rule KAMAILIO_IMS_PCSCF_SEC_AGREE_DOS_CVE_2026_52023
{
meta:
author = "Valtersit Threat Intelligence"
description = "Detects SIP messages with malformed Security-Agreement headers exploiting CVE-2026-52023"
date = "2026-06-17"
cve = "CVE-2026-52023"
reference = "NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-52023"
severity = "high"
strings:
$sm1 = "Security-Client:" ascii
$sm2 = "Security-Verify:" ascii
$sm3 = "Security-Server:" ascii
$sp1 = "alg=" ascii
$sp2 = "ealg=" ascii
$sp3 = "prot=" ascii
$sp4 = "mod=" ascii
$method_register = "REGISTER" ascii
$method_subscribe = "SUBSCRIBE" ascii
$sip_2 = "sip:" ascii
$long_param = /[a-zA-Z]+=[^;\s,]{256,}/ ascii
condition:
uint16(0) == 0x0D0A and
(any of ($sm*) and any of ($sp*) and any of ($long_param)) and
(any of ($method_*)) and
filesize < 1MB
}
Suricata IDS Rule
alert udp any any -> any 5060 (msg:"ET TROJAN Kamailio IMS PCSCF Security-Agreement Parsing DoS Attempt (CVE-2026-52023)"; flow:to_server; content:"REGISTER"; nocase; content:"Security-Client:"; nocase; pcre:"/alg=[^;\s,]{256,}/i"; sid:2026520231; rev:1; classtype:attempted-dos; reference:cve,2026-52023; reference:url,nvd.nist.gov/vuln/detail/CVE-2026-52023;)
alert udp any any -> any 5060 (msg:"ET TROJAN Kamailio IMS PCSCF Security-Verify Parsing DoS Attempt (CVE-2026-52023)"; flow:to_server; content:"REGISTER"; nocase; content:"Security-Verify:"; nocase; pcre:"/alg=[^;\s,]{256,}/i"; sid:2026520232; rev:1; classtype:attempted-dos; reference:cve,2026-52023;)
alert tcp any any -> any 5060 (msg:"ET TROJAN Kamailio IMS PCSCF Security-Agreement Malformed Semicolon Sequence (CVE-2026-52023)"; flow:to_server,established; content:"REGISTER"; nocase; content:"Security-Client:"; nocase; content:";;"; sid:2026520233; rev:1; classtype:attempted-dos; reference:cve,2026-52023;)
alert udp any any -> any 5060 (msg:"ET TROJAN Kamailio IMS PCSCF Security-Client Header Buffer Probe (CVE-2026-52023)"; flow:to_server; content:"SUBSCRIBE"; nocase; content:"Security-Client:"; nocase; pcre:"/.\/[a-zA-Z0-9+\/]{128,}/i"; sid:2026520234; rev:1; classtype:attempted-dos; reference:cve,2026-52023;)
Elastic Detection
// EQL Query: Detect malformed SIP REGISTER/SUBSCRIBE with suspicious Security-Agreement headers
sequence by source.ip with maxspan=5m
[ network where network.protocol == "sip" and
network.direction == "ingress" and
destination.port == 5060 and
event.category == "network" ]
[ any where
network.protocol == "sip" and
// Look for oversized or malformed security agreement parameters in payload
// This is a heuristic: excessively long alg= values in Security-Client header
(wildcard(sip.header.*, "*alg=*") and
length_of_longest_param > 255) ]
Note: EQL does not natively support regex-based payload inspection on SIP headers in most standard setups. The rule above uses a heuristic proxy — detecting SIP traffic destined for port 5060 followed by application-level anomaly signals. In production environments, this should be paired with a custom pipeline/ingest processor that extracts alg= parameter lengths from SIP payloads, or with a network sensor (Suricata) feeding alerts into Elastic.
Splunk SPL Query
index=proxy OR index=netflow OR index=stream
| search dest_port=5060 AND (proto=udp OR proto=tcp)
| rex field=_raw "(?i)REGISTER (?<sip_uri>\S+)"
| rex field=_raw "(?i)SUBSCRIBE (?<sip_uri>\S+)"
| rex field=_raw "(?i)Security-(Client|Verify|Server):[^\r\n]*(?<sec_param>alg=[^;,\s\n]+)"
| eval alg_len = len(sec_param) - 4
| where alg_len > 255 OR sec_param LIKE "%;;%"
| stats count by src_ip, dest_ip, dest_port, sec_param
| where count > 5
| sort -count
# Alternative: Detect rapid crash/restart patterns of Kamailio processes (post-exploitation indicator)
index=_internal OR index=main sourcetype=syslog
| search "kamailio" AND ("segmentation fault" OR "SIGSEGV" OR "crash" OR "core dumped" OR "worker process")
| stats count by host, source
| where count > 10
Wazuh OSSEC Rule
<group name="kamailio_ims_security,">
<!-- Rule 1: Detect Kamailio worker crash (post-exploitation) -->
<rule id="655071" level="12">
<decoded_as>syslog</decoded_as>
<field name="program_name">kamailio</field>
<match>Segmentation fault|SIGSEGV|core dumped|CRASH</match>
<description>Kamailio process crashed - possible CVE-2026-52023 DoS exploitation</description>
<group>dos,attack,cve_2026_52023,</group>
<mitre>
<id>T1499</id>
<id>T1499.004</id>
</mitre>
</rule>
<!-- Rule 2: Detect RESTART from crash -->
<rule id="655072" level="8">
<field name="program_name">kamailio</field>
<match>restart|starting|Initializing</match>
<description>Kamailio restarting - possible prior crash from CVE-2026-52023 exploitation</description>
<group>dos,attack,cve_2026_52023,</group>
</rule>
<!-- Rule 3: Syslog-based detection of malformed SIP requests (requires kamailio log level INFO/DEBUG) -->
<rule id="655073" level="10">
<field name="program_name">kamailio</field>
<match>parse_sec_agree|sec_agree|pcscf_save_pending|ims_registrar_pcscf</match>
<description>Malformed security-agreement SIP message logged - possible CVE-2026-52023 trigger</description>
<group>dos,attack,cve_2026_52023,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 0/4 — UNPATCHED. No patch evidence exists from any tracked source. No vendor advisory, no fixed version, no commit reference, and no workaround documentation have been published. Do not assume a fixed version exists in any future Kamailio release without vendor confirmation.
1. Immediate Mitigations (no patch available):
- Disable the IMS registrar PCSCF module if it is not strictly required for your deployment. If you are not operating IMS/P-CSCF functionality, unload
ims_registrar_pcscfand remove thepcscf_save_pendingroute calls from your Kamailio configuration. - Restrict network access to SIP signaling ports (5060/5061 UDP/TCP) using firewall ACLs. Allow only trusted SIP peer IP ranges and upstream proxy/registrar addresses. Do not expose SIP endpoints directly to the internet.
- Deploy a SIP-aware application-layer firewall (SBC — Session Border Controller) in front of Kamailio to filter malformed SIP messages and enforce strict header validation on
Security-Client,Security-Verify, andSecurity-Serverheaders (RFC 3329 compliance). - Deploy rate limiting at the network perimeter to throttle SIP REGISTER/SUBSCRIBE traffic per source IP, mitigating volumetric crash-and-repeat DoS campaigns.
- Enable Kamailio monitoring and auto-restart (e.g., systemd
Restart=on-failure, Kamailio's-Ddaemon mode with watchdog, or Pacemaker/Corosync clustering for automatic failover).
2. Patch / Upgrade Steps:
- Continuously monitor the Kamailio GitHub repository (github.com/kamailio/kamailio) and the kamailio.org security announcements page for a fix addressing the
ims_registrar_pcscfmodule andsec_agree.cparsing logic. - Subscribe to the Kamailio security mailing list and NVD notifications for CVE-2026-52023.
- When a patched release becomes available, upgrade to the patched version. Test the patch in a staging environment replicating your IMS routing before production deployment. If upgrading is not immediately possible, backport the specific fix to
sec_agree.cif the vendor publishes a patch commit and you have a custom build pipeline.
3. Long-Term Hardening:
- Monitor crash metrics: Instrument Kamailio to alert on worker process crashes, abrupt restarts, and error log entries mentioning
parse_sec_agreeorsec_agree. A spike in crashes is a strong indicator of active exploitation. - Deploy intrusion detection: Implement the Suricata rules and Sigma rules from this report at network ingestion points to detect exploit attempts in real time.
- Conduct regular code audits of your Kamailio configuration, especially any custom modules interacting with IMS extensions.
- Join the Kamailio community and monitor release notes for each new version to identify when CVE-2026-52023 is addressed.
- Consider defensive in-depth: If IMS registrar PCSCF is a business requirement, isolate it on dedicated hosts with minimal additional attack surface and ensure crash-only impact (not lateral movement) via strict OS-level hardening.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-52023
- Kamailio Official Site: https://www.kamailio.org/
- Kamailio GitHub Repository (for patch watch): https://github.com/kamailio/kamailio
- Kamailio Security Announcements: https://www.kamailio.org/w/security/
- RFC 3329 (Security Agreement for SIP): https://datatracker.ietf.org/doc/html/rfc3329
Threat Actor Campaigns / Exploit-in-the-Wild: No known threat actor campaigns or confirmed in-the-wild exploitation have been reported for CVE-2026-52023 as of this writing. No exploit code has been published, and no CISA KEV designation exists. The lack of public exploitation likely reflects the niche IMS-specific attack surface. However, unpatched DoS vulnerabilities in SIP infrastructure are routinely probed by botnets and automated scanners; the attack window remains open indefinitely until a patch is released.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.