Kamailio
CVE-2025-12205
LOW
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocal user access
-
DeliveryCraft malformed configuration file
-
ExploitTrigger parser reload or restart
-
Executionsr_push_yy_state processes unsafe state
-
PersistUse-after-free memory access
-
ImpactProcess crash or memory corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, buffer size validation
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Local authenticated user access to the Kamailio system is required; unauthenticated remote exploitation is not possible per the CVSS AV:L/PR:L vector. The attacker must have write access to Kamailio configuration files or the ability to reload the configuration parser (potentially via a service interface if improperly exposed). The vulnerable code path is activated only when the configuration file parser processes malformed directives that trigger the sr_push_yy_state function in an unsafe state. Non-default configurations or specific syntactic patterns in the malformed configuration are likely required to reliably trigger the use-after-free condition, as the parser generally handles valid configurations without issue. The vulnerability is NOT exploitable against default, unmodified Kamailio installations that do not allow untrusted local users to modify configuration files. Limiting factors include: (1) requirement for local system access, (2) need for file write permissions on configuration files (not granted to unprivileged users in secure deployments), (3) likely need for configuration reload trigger (not all deployments allow dynamic reloads), and (4) high probability that exploit success is contingent on specific malformed input patterns rather than any configuration. |
| Impact | This vulnerability presents minimal real-world risk despite technically being a use-after-free issue. The CVSS 4.0 score of 1.9 reflects severe mitigating factors: local attack vector (AV:L) eliminates remote exploitation, authentication requirement (PR:L) limits attackers to local users with valid accounts, and impact severity is low across all CIA metrics (VC:L, VI:L, VA:L) with no scope change. The EPSS score of 0.02% (5th percentile) indicates very low probability of exploitation in practice. Critically, the vulnerability requires direct manipulation of Kamailio configuration files-a highly controlled operation in production environments where configuration is typically managed by authorized administrators through change control processes. The public disclosure notes the vendor's non-response and explicit statement that 'real existence of this vulnerability is still doubted,' suggesting potential analysis artifacts or edge-case conditions that may not manifest in normal operation. The attack vector (malformed config file parsing) and privilege requirement (local authenticated user) together create a scenario more aligned with insider threat or development/testing environment risk than production compromise. The existence of publicly available POC code (E:P per CVSS) does not materially increase risk given the exploitability constraints. |
| Exploit ScenarioDerived | A local user with authenticated access to a Kamailio server creates or modifies the Kamailio configuration file (typically /etc/kamailio/kamailio.cfg or similar) with specially crafted syntax that triggers malformed parsing in the sr_push_yy_state function, causing the lexical analyzer to reference freed memory. This could be a system administrator with misconfigured permissions, a developer in a testing environment, or an attacker who has compromised a service account with configuration file write access. The resulting use-after-free may cause the Kamailio process to crash (denial of service) or, in optimistic exploitation scenarios, potentially leak sensitive memory or enable code execution, though the latter is constrained by modern memory protections and the low impact metrics. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 29, 2026
Use-after-free vulnerability in Kamailio 5.5.0 configuration file parser allows local authenticated attackers to cause denial of service or memory corruption via malformed configuration files. The vulnerability exists in the sr_push_yy_state function within the lexical analyzer (cfg.lex) and has publicly available exploit code, though the vendor has not responded to disclosure and practical exploitability remains uncertain due to the requirement for direct configuration file manipulation.
RemediationAI
No vendor-released patch has been identified at time of analysis, as the Kamailio vendor did not respond to the disclosure. Users of Kamailio 5.5.0 should immediately apply the strictest available access controls to configuration files: restrict file permissions to the Kamailio process user and dedicated administrators only (chmod 0600 or similar), disable configuration reload functionality if not actively used, validate all configuration file changes through integrity monitoring tools (e.g., AIDE, Tripwire, or file system ACLs), and implement configuration file change logs to audit who and what modified parsing-related directives. For production systems, consider upgrading to the next stable release (5.6.x or later) once vendor patches are issued and tested. Temporary mitigation includes disabling dynamic configuration reloading if the vulnerable code path is only triggered during reload operations. However, these mitigations do not address the underlying memory safety issue and should be treated as temporary measures pending vendor patches. Users should subscribe to Kamailio security mailing lists or monitor GitHub releases for patch availability.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in Kamailio's configuration file parsing subsystem, specifically in the lexical analyzer (src/core/cfg.lex). The sr_push_yy_state function manages the parser's state stack during configuration file tokenization. The use-after-free condition (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) indicates that freed memory is being accessed during lexical analysis, likely when processing malformed configuration directives. This is a memory safety issue in C code without proper bounds checking or use-after-free protection. The affected product is Kamailio 5.5.0, as identified via CPE cpe:2.3:a:kamailio:kamailio:5.5.0:*:*:*:*:*:*:*.
Know when Kamailio 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
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (vuldb) · only source for this CVE.
CVSS VectorVendor: vuldb
DescriptionCVE.org
A vulnerability was detected in Kamailio 5.5. The affected element is the function sr_push_yy_state of the file src/core/cfg.lex of the component Configuration File Handler. The manipulation results in use after free. The attack must be initiated from a local position. The exploit is now public and may be used. The real existence of this vulnerability is still doubted at the moment. This attack requires manipulating config files which might not be a realistic scenario in many cases. The vendor was contacted early about this disclosure but did not respond in any way.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Heap-based buffer overflow in the encode_msg function in encode_msg.c in the SEAS module in Kamailio (formerly OpenSER a
In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation
In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with a double "To" header and an empty "To" tag c
Insecure Temporary file vulnerability in /tmp/kamailio_fifo in kamailio 4.0.1. Rated critical severity (CVSS 9.8), this
A Buffer Overflow issue was discovered in Kamailio before 4.4.7, 5.0.x before 5.0.6, and 5.1.x before 5.1.2. Rated criti
Heap-based buffer overflow in Kamailio's CDP (C Diameter Peer) module allows a remote party that can deliver a malformed
Kamailio before 5.4.0, as used in Sip Express Router (SER) in Sippy Softswitch 4.5 through 5.2 and other products, allow
The kamcmd administrative utility and default configuration in kamailio before 4.3.0 use /tmp/kamailio_ctl. Rated high s
The kamailio build in kamailio before 4.2.0-2 process allows local users to gain privileges. Rated high severity (CVSS 7
Denial of service in Kamailio v6.1.1 and earlier allows an unauthenticated remote attacker to crash the SIP proxy by sen
Out-of-bounds memory access in Kamailio SIP server versions before 5.8.8, 6.0.6, and 6.1.1 enables unauthenticated remot
A heap/stack-adjacent buffer overflow in Kamailio's optional sipt module lets remote, unauthenticated attackers crash th
NVD
CVE.org
EPSS
VulDB
GitHub PoC
Exploit-DB