Skip to navigation

Threat reportVulnerabilityTL-2026-1688

Critical FreePBX Flaws Enable Unauthenticated RCE (UCP Socket.IO Auth Bypass) and SQL Injection Leading to Admin Takeover

criticalPATCHED

Two critical, unauthenticated FreePBX flaws let a remote attacker with no credentials compromise internet-facing PBX deployments: a socket.io namespace authentication-bypass in the User Control Panel (UCP) Node server that enables arbitrary command execution via Asterisk Manager Interface (AMI) action injection (GHSA-37j8-fhxx-9vhp), and an unescaped SQL injection in the missedcall module's Caller ID name handling reachable via a crafted SIP From header that can corrupt the database and hijack administrator control-panel credentials (GHSA-g27h-xf3q-h3rm).

Key facts

IdentifiersTL-2026-1688
Also known asGHSA-37j8-fhxx-9vhp, GHSA-g27h-xf3q-h3rm
SeverityCRITICAL
CVSS9.3 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)
Affected productsSangoma / FreePBX FreePBX UCP (User Control Panel) module; Sangoma / FreePBX FreePBX missedcall module
Weaknesses (CWE)CWE-862, CWE-89
ToolsFreePBX Firewall (Responsive Firewall), Session Border Controller (SBC)
MITRE ATT&CK techniquesT1046 Network Service Discovery, T1059 Command and Scripting Interpreter, T1068 Exploitation for Privilege Escalation, T1078 Valid Accounts, T1098 Account Manipulation, T1106 Native API, T1133 External Remote Services, T1136 Create Account, T1190 Exploit Public-Facing Application, T1211 Exploitation for Stealth, T1556 Modify Authentication Process, T1565 Data Manipulation and 3 more in the attack flow
MotivationUNKNOWN
Target sectorstelecoms, voip-providers, government administration, health, financial-services, hospitality, managed-service-providers, small-medium-business
Target regionsGlobal
Detection rules9 (1 shown free)
Sources9 cited sources

Detection coverage

As of 2026-07-23, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-1688 across Splunk SPL, Microsoft KQL and Sigma, covering 25 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: FreePBX ampusers Credential Manipulation via missedcall SIP-CNAM SQL Injection — SPL

Detects unauthorized INSERT/UPDATE writes to the FreePBX `ampusers` administrator-credentials table that are not correlated with an authenticated admin.php web session, together with inbound SIP Caller-ID Name (CNAM) values containing SQL metacharacters/keywords on calls to monitored extensions — the exploitation and impact chain of the unauthenticated missedcall SQL injection (GHSA-g27h-xf3q-h3rm) that rewrites administrator credentials for account takeover.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1565.001, T1098, T1136.001, T1078, T1556
  • Data sources: mysql_audit_log (freepbx_db), asterisk_full_log (SIP signaling), azure_mysql_flexible_server_audit_logs (AzureDiagnostics)
  • Severity: critical
  • Confidence: high

Splunk SPL

index=freepbx_db sourcetype="mysql_audit" db_table="ampusers" db_operation IN ("INSERT","UPDATE") earliest=-24h@h latest=now
| where source_process!="admin.php"
| eval detection_reason="unauthorized_ampusers_write"
| table _time host db_table db_operation source_process detection_reason
| append
    [ search index=asterisk sourcetype="asterisk:full" earliest=-24h@h latest=now
      | rex field=_raw "From:\s*\"(?<cnam>[^\"]+)\""
      | search cnam=*
      | regex cnam="(?i)(--|;|'|\bDROP\b|\bINSERT\b|\bUNION\b|\bSELECT\b)"
      | eval detection_reason="malicious_cnam_sip_header"
      | table _time host cnam detection_reason ]
| sort - _time

Microsoft KQL

let SuspiciousCNAM = Syslog
    | where TimeGenerated > ago(24h)
    | where ProcessName =~ "asterisk"
    | where SyslogMessage has "From:" and SyslogMessage matches regex @"(--|;|'|\bDROP\b|\bINSERT\b|\bUNION\b|\bSELECT\b)"
    | project TimeGenerated, Computer, Reason = "malicious_cnam_sip_header", Detail = SyslogMessage;
let UnauthorizedAmpusersWrites = AzureDiagnostics
    | where TimeGenerated > ago(24h)
    | where Category == "MySqlAuditLogs"
    | where event_class_s == "table_access" and event_subclass_s in ("INSERT","UPDATE")
    | where OBJECT_NAME_s =~ "ampusers"
    | where not(TargetProcess_s has "admin.php")
    | project TimeGenerated, Computer = LogicalServerName_s, Reason = "unauthorized_ampusers_write", Detail = strcat(event_subclass_s, " on ", OBJECT_NAME_s);
SuspiciousCNAM
| union UnauthorizedAmpusersWrites
| sort by TimeGenerated desc

Sigma

title: FreePBX ampusers Table Manipulation via missedcall SQL Injection (SIP CNAM)
id: 7a1e4b90-2f3d-4c8a-b6e1-1688a1003003
status: experimental
description: Detects INSERT/UPDATE writes to the FreePBX ampusers administrator-credentials table that are not correlated with an authenticated admin.php session, and inbound SIP Caller-ID Name (CNAM) values containing SQL metacharacters/keywords on calls to monitored extensions — the exploitation and impact artifacts of the unauthenticated missedcall SQL injection (GHSA-g27h-xf3q-h3rm) leading to administrator account takeover.
references:
    - https://github.com/FreePBX/security-reporting/security/advisories/GHSA-g27h-xf3q-h3rm
author: Threadlinqs Team
date: 2026-07-25
tags:
    - attack.impact
    - attack.t1565.001
    - attack.persistence
    - attack.t1098
    - attack.t1136.001
    - attack.privilege-escalation
    - attack.t1078
    - attack.credential-access
    - attack.t1556
    - cve.2026.ghsa-g27h-xf3q-h3rm
logsource:
    product: freepbx
    category: database_write
detection:
    selection_db:
        db.table: 'ampusers'
        db.operation:
            - 'INSERT'
            - 'UPDATE'
    filter_admin_ui:
        source_process: 'admin.php'
    selection_cnam:
        sip.from_display_name|re: ".*(--|;|'|DROP\\s|INSERT\\s|UNION\\s|SELECT\\s).*"
    condition: (selection_db and not filter_admin_ui) or selection_cnam
falsepositives:
    - Bulk user-provisioning scripts run by administrators outside the web UI
    - Legitimate caller names that happen to contain an apostrophe (rare, but possible)
level: critical

Known false positives:

  • Bulk user-provisioning scripts run by administrators outside the web UI
  • Legitimate caller names that happen to contain an apostrophe (rare, but possible)

Tuning notes: Maintain an exception list of known non-interactive provisioning scripts/service accounts that legitimately write to ampusers outside admin.php; tighten the CNAM regex to the specific metacharacter set observed in the environment's SIP trunk traffic to avoid flagging rare but legitimate apostrophes in caller names, and correlate a subsequent Administrator Control Panel login (T1078) within minutes of either signal to raise this to a confirmed-compromise alert.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • Unauthenticated [indicator] Namespace Connection to FreePBX [indicator] Node Server (Ports 8001/8003) — KQL · unlock with TL Creds
  • Unauthenticated AMI Originate/Command Action Injected via FreePBX [indicator] Node Process — KQL · unlock with TL Creds
  • FreePBX ampusers Credential Manipulation via [indicator] SIP-CNAM SQL Injection — KQL · unlock with TL Creds
  • Unauthenticated [indicator] Namespace Connection to FreePBX [indicator] Node Server (Ports 8001/8003) — Sigma · unlock with TL Creds
  • Unauthenticated AMI Originate/Command Action Injected via FreePBX [indicator] Node Process — Sigma · unlock with TL Creds
  • FreePBX ampusers Credential Manipulation via [indicator] SIP-CNAM SQL Injection — Sigma · unlock with TL Creds
  • Unauthenticated [indicator] Namespace Connection to FreePBX [indicator] Node Server (Ports 8001/8003) — SPL · unlock with TL Creds
  • Unauthenticated AMI Originate/Command Action Injected via FreePBX [indicator] Node Process — SPL · unlock with TL Creds

Indicators of compromise

As of 2026-07-23, Threadlinqs Intelligence tracks 25 indicators of compromise for TL-2026-1688.

Sample indicators (2 of 25)

  • URL: hxxps://github[.]com/FreePBX/security-reporting/security/advisories/GHSA-37j8-fhxx-9vhp
  • URL: hxxps://github[.]com/FreePBX/security-reporting/security/advisories/GHSA-g27h-xf3q-h3rm

Defanged, TLP:CLEAR. Full set of 25 indicators: unlock with TL Creds.

25 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

Both score CVSS v4 9.3, require no authentication or user interaction, and patches are already available.

On 2026-07-16, FreePBX's security-reporting team published two critical advisories affecting Sangoma's FreePBX open-source PBX platform.

The first, GHSA-37j8-fhxx-9vhp, affects the FreePBX 17 User Control Panel (UCP) module prior to version 17.0.9. The UCP Node server listens on port 8001 (non-TLS) and port 8003 (TLS) and is designed to gate every socket.io connection with an `io.use(checkAuth)` middleware. A behavioral change in socket.io v4 altered how namespaces are handled — each namespace is now treated as its own independent channel — which caused the intended `checkAuth` authorization gate to no longer apply per-namespace. This lets an unauthenticated remote attacker open a raw socket.io connection to the UCP Node server and send crafted namespace events that are relayed into the Asterisk Manager Interface (AMI), resulting in arbitrary command execution with the privileges of the `asterisk` service account. The flaw is tracked as CWE-862 (Missing Authorization), carries a Red provider-urgency rating, and was reported by researcher mil1200, coordinated by chrsmj, analyzed by push143smart, with the fix engineered by Sangoma-Heera. Administrators can confirm patch status by inspecting the UCP login page HTML source for the `x-pjax-version` meta tag (patched builds show `v17.0.9`).

The second, GHSA-g27h-xf3q-h3rm, affects the FreePBX missedcall module — versions before 16.0.11 on FreePBX 16 and before 17.0.6 on FreePBX 17. The module performs an INSERT into the database every time a call to a monitored extension goes unanswered, and that INSERT concatenates the caller's inbound Caller ID Name (CNAM), taken directly from the SIP `From` header, straight into the SQL string with no escaping or parameterization (CWE-89). Because inbound SIP CNAM fields are not length-restricted the way legacy PSTN CNAM is, an attacker who can place a call to a monitored extension — via an open/anonymous SIP endpoint, a compromised SIP trunk, or direct internet calling — can inject a caller name containing SQL metacharacters that corrupts the database and rewrites administrator control-panel credentials, yielding full unauthorized access to the FreePBX Administrator Control Panel. FreePBX rated this issue Amber urgency (versus Red for the UCP flaw) because the missedcall module is not universally deployed, but the CVSS v4 base score is identical at 9.3, and the same reporter/coordinator pair (mil1200/chrsmj) is credited.

Neither advisory has an assigned CVE ID as of this writing (tracked only via their GHSA identifiers) and neither vendor nor independent researchers have reported confirmed in-the-wild exploitation, so this threat is classified DISCLOSED rather than ACTIVE. However, both bugs are remotely reachable pre-auth, require zero user interaction, and are chainable in principle — RCE via the UCP flaw could be used to further manipulate the same database the missedcall SQLi corrupts, and either flaw alone is sufficient for a full administrative compromise of an internet-facing FreePBX system. The FreePBX Community Forum thread on the missedcall SQLi (started 2026-07-16) also surfaced a public exploitability debate: community member James Finstrom initially argued the practical attack chain — requiring a crafted-CNAM call to go unanswered on a monitored extension — was so improbable it was like "playing your local lottery," before conceding real-world risk factors (stolen SIP credentials, unencrypted UDP exposure, SBC/firewall misconfiguration) could still make it exploitable.

FreePBX's own security-reporting bundle (surfaced the same week by the Canadian Centre for Cyber Security in advisory AV26-711) also shipped four additional, separately-tracked advisories in the same July 2026 release train, all requiring an existing authenticated FreePBX administrator account (unlike the two unauthenticated flaws documented here): GHSA-hg3v-m857-mvw9 (TTS module AGI command injection via the TTS destination name, tts < 16.0.6 on FreePBX 16 / < 17.0.6 on FreePBX 17), GHSA-p97w-rq48-p8q2 (Music module RCE via mpg123 and crafted Asterisk call files, music < 17.0.7 on FreePBX 17), and a `framework` module hardening bump to 16.0.47 (FreePBX 16) / 17.0.30 (FreePBX 17) with no distinct CVE-level vulnerability details published for the framework bump itself. These authenticated-only issues are out of scope for this unauthenticated-RCE/SQLi threat record but confirm Sangoma ran a broader coordinated hardening pass that week.

Mitigation is straightforward: patch the `ucp` module to 17.0.9+ and the `missedcall` module to 16.0.11+ (FreePBX 16) or 17.0.6+ (FreePBX 17); until patched, use the FreePBX Firewall module's Responsive Firewall feature to restrict UCP ports 8001/8003 to IPs with a successfully registered SIP endpoint, restrict inbound calling to trusted SIP trunks, and deploy a Session Border Controller (SBC) to sanitize SIP From headers before they reach FreePBX.

MITRE ATT&CK techniques by tactic:

Discovery

T1046 Network Service Discovery

Execution

T1059 Command and Scripting Interpreter; T1106 Native API

Privilege Escalation

T1068 Exploitation for Privilege Escalation; T1078 Valid Accounts

Persistence

T1098 Account Manipulation; T1136 Create Account

Initial Access

T1133 External Remote Services; T1190 Exploit Public-Facing Application

Defense Evasion

T1211 Exploitation for Stealth

Credential Access

T1556 Modify Authentication Process

Impact

T1565 Data Manipulation

Resource Development

T1588 Obtain Capabilities

Reconnaissance

T1592 Gather Victim Host Information; T1595 Active Scanning

Remediation

Patches

  • ucp module 17.0.9
  • missedcall module 16.0.11 (FreePBX 16)
  • missedcall module 17.0.6 (FreePBX 17)

Immediate actions

  • Update the FreePBX ucp module to 17.0.9 or later
  • Update the FreePBX missedcall module to 16.0.11 (FreePBX 16) or 17.0.6 (FreePBX 17) or later
  • Enable the FreePBX Firewall module with Responsive Firewall to restrict UCP ports 8001/8003 to IPs with successfully registered SIP endpoints
  • Restrict inbound SIP calling to trusted, known SIP trunks only to reduce missedcall SQL injection exposure

Workarounds

  • Overwrite/normalize inbound Caller ID names early in the dialplan (e.g., via Superfecta) to strip SQL metacharacters before they reach missedcall
  • Firewall UCP ports 8001/8003 from all untrusted networks if immediate patching is not possible

Longer-term hardening

  • Deploy a Session Border Controller (SBC) in front of FreePBX to sanitize/filter SIP From headers before they reach the missedcall module
  • Place UCP and the Administrator Control Panel behind VPN, MFA, or FreePBX User Management/SAML rather than exposing them directly to the internet
  • Track upstream socket.io release notes for further namespace-authentication regressions, since this is a second instance of a socket.io behavior change weakening FreePBX's auth model

Affected and fixed versions

  • Sangoma / FreePBX — FreePBX UCP (User Control Panel) module
    Vulnerable versions: FreePBX 17 UCP prior to 17.0.9
    Fixed in: FreePBX 17 UCP 17.0.9
  • Sangoma / FreePBX — FreePBX missedcall module
    Vulnerable versions: FreePBX 16 missedcall prior to 16.0.11; FreePBX 17 missedcall prior to 17.0.6
    Fixed in: FreePBX 16 missedcall 16.0.11; FreePBX 17 missedcall 17.0.6

Timeline

  • Sangoma's July 2026 security-reporting release train bundles four additional advisories alongside ucp/missedcall, all requiring authentication: GHSA-hg3v-m857-mvw9 (TTS module AGI command injection via TTS destination name, tts <16.0.6/<17.0.6), GHSA-p97w-rq48-p8q2 (Music module RCE via mpg123 and crafted Asterisk call files, music <17.0.7), and a framework module hardening bump to 16.0.47/17.0.30 with no distinct CVE-level details published.
  • FreePBX Community Forum threads opened for both advisories; a socket.io maintainer explains that namespace-based channel handling in socket.io v4 caused the checkAuth middleware to stop gating per-namespace connections.
  • Sangoma ships patched ucp module 17.0.9 and missedcall module 16.0.11 (FreePBX 16) / 17.0.6 (FreePBX 17) alongside the advisories; core framework module also bumped to 16.0.47/17.0.30 in the same release train.
  • FreePBX Security Reporting publishes GHSA-37j8-fhxx-9vhp and GHSA-g27h-xf3q-h3rm, disclosing the UCP socket.io authentication-bypass RCE and the missedcall SQL injection, both CVSS v4 9.3.
  • On the missedcall SQLi community thread, FreePBX community member James Finstrom argues the practical exploit chain (crafted-CNAM call going unanswered on a monitored extension) is highly improbable, then acknowledges real-world risk factors — stolen SIP credentials, unencrypted UDP exposure, firewall/SBC misconfiguration — that could still enable exploitation.
  • Canadian Centre for Cyber Security publishes advisory AV26-711 summarizing both FreePBX flaws for government and critical-infrastructure consumers.
  • Threat ingested into the TL-Intel Harness backlog via the GBHackers RSS feed for hunt/research pipeline processing.
  • GBHackers publishes coverage warning that unauthenticated attackers can chain the flaws to execute code and take over FreePBX administrator accounts on internet-facing deployments.

Sources cited

Previous and next in vulnerability

Drafted by the Threadlinqs research pipeline from 9 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats