Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
CriticalPublic exploit

RCE in FreePBX Rest Phone Apps (restapps)

IdentifiersCVE-2021-45461CWE-78

CVE-2021-45461 is a remote code execution vulnerability affecting FreePBX when the commercial Rest Phone Apps (restapps) module is installed. The provided content states affected versions are 15.0.19.87, 15.0.19.88, 16.0.18.40, and 16.0.18.41, and that the issue was exploited in the wild in December 2021. Multiple reporting excerpts correlate exploitation with deployment of PHP web shells on FreePBX/Elastix systems. Supporting content also references a proof-of-concept discussion describing the vulnerable behavior as unsanitized handling of a POST parameter named entity passed to system(), which is consistent with OS command injection leading to arbitrary command execution. Fixed versions are identified as 15.0.20 and 16.0.19.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a remote attacker to execute arbitrary commands on the target FreePBX host. In observed campaigns, this was followed by installation of persistent PHP web shells, creation of privileged or root-level accounts, password resets, SSH key insertion, configuration theft, system and Asterisk/FreePBX reconnaissance, and abuse of telephony resources including outbound call activity and likely toll fraud. Because the target is a PBX platform, compromise can also expose call-management data and enable long-term administrative control of voice infrastructure.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, disable or remove the Rest Phone Apps module, restrict access to the FreePBX administrative/web interface to trusted management networks only, and block direct internet exposure. Monitor for suspicious requests to restapps-related paths and for indicators of web-shell deployment in common FreePBX/Elastix web directories. Audit for unauthorized root or administrative accounts, unexpected cron-based re-download tasks, modified .htaccess or PHP files, SSH key changes, and anomalous Asterisk activity such as unauthorized call origination. Apply network controls, WAF/IPS protections where available, and isolate affected PBX systems until they can be patched and validated.

Remediation

Patch, then assume compromise.

Upgrade the Rest Phone Apps (restapps) module to a fixed release: 15.0.20 or 16.0.19, as applicable. Identify and remove vulnerable versions 15.0.19.87, 15.0.19.88, 16.0.18.40, and 16.0.18.41 from exposed systems. Given confirmed in-the-wild exploitation, any internet-exposed or suspiciously behaving FreePBX/Elastix instance with the vulnerable module installed should be treated as potentially fully compromised: remove malicious web shells, review web-accessible PHP files for unauthorized additions or timestamp spoofing, audit cron jobs, local users, SSH authorized_keys, password changes, and PBX configuration integrity, and rotate all credentials and keys associated with the system. Rebuild from known-good media if compromise is confirmed or cannot be ruled out.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Sangoma Technologies CorporationRestappsapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence2

Every observed campaign linking this CVE to a named adversary.

Associated malware3

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity1

Community discussion across Reddit, Mastodon, and other social sources.