FreePBX Framework Module Authentication Bypass via Forged Authorization Header (CVE-2025-66039)
by Virendra Kumar (Cyber Leelawat); Nuclei template author rxerium · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-66039
- Category
- network
- Affected product
- FreePBX (Sangoma) framework module — web-based administration panel for Asterisk-based VoIP/PBX systems
- Affected versions
- FreePBX 16 < 16.0.44 (patched in 16.0.44); FreePBX 17 < 17.0.23 (patched in 17.0.23)
- Disclosed
- 2026-07-06
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | Virendra Kumar (Cyber Leelawat); Nuclei template author rxerium |
| CVE / Advisory | CVE-2025-66039 |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (per NVD; the source repository Nuclei template cites CVSS v3.1 9.3) |
| Status | PoC |
| Tags | freepbx, sangoma, voip, telephony, authentication-bypass, access-control, authtype, webserver-auth, cwe-287, cwe-863, nuclei, version-fingerprinting |
| Related | CVE-2025-61675 (FreePBX endpoint module authenticated SQLi), CVE-2025-61678 (FreePBX endpoint module authenticated arbitrary file upload) |
Affected Target
| Field | Value |
|---|---|
| Software / System | FreePBX (Sangoma) framework module — web-based administration panel for Asterisk-based VoIP/PBX systems |
| Versions Affected | FreePBX 16 < 16.0.44 (patched in 16.0.44); FreePBX 17 < 17.0.23 (patched in 17.0.23) |
| Language / Platform | Detection PoC written as a Nuclei YAML template (HTTP protocol); target is the FreePBX web administration panel (PHP/Apache) |
| Authentication Required | No (the vulnerability itself is a pre-auth bypass; the mirrored PoC only performs unauthenticated version fingerprinting) |
| Network Access Required | Yes (HTTP access to the FreePBX Administrator Control Panel, typically /admin/config.php) |
Summary
CVE-2025-66039 is a critical authentication bypass in the FreePBX framework module that occurs when the system’s “Authorization Type” (AUTHTYPE) is configured to webserver — in this mode FreePBX trusts an externally-supplied Authorization header (intended for web-server-level HTTP auth delegation) to determine the logged-in identity, and an attacker can forge that header to log in to the Administrator Control Panel without valid credentials. The root cause is that FreePBX’s webserver auth mode implicitly trusts client-supplied identity data instead of independently verifying it against FreePBX’s own credential store. This mirrored repository does not contain working exploitation code for the bypass itself — it only ships a Nuclei detection template that fingerprints the FreePBX version string from the admin login page and flags instances running versions vulnerable to CVE-2025-66039 (alongside two sibling CVEs in the endpoint module). Successful exploitation of the underlying bug grants full administrative control over the PBX, including call routing, extensions, and voicemail, on unpatched systems.
Vulnerability Details
Root Cause
Per the repository’s own template metadata, the vulnerability is: “Authentication bypass vulnerability in FreePBX that occurs when the ‘Authorization Type’ (AUTHTYPE) is set to ‘webserver’, allowing an attacker to log in to the Administrator Control Panel via a forged Authorization header.” This is a broken/misplaced trust boundary (CWE-287: Improper Authentication / CWE-863: Incorrect Authorization) — the framework module’s authentication logic, when AUTHTYPE=webserver, defers identity decisions to an HTTP header the framework itself does not independently authenticate, rather than validating credentials through FreePBX’s normal login flow. No PHP/exploit code implementing the actual header-forging login bypass is present in this repository; only the following Nuclei template performs non-invasive version detection:
| |
Attack Vector
- (Detection, as implemented in this repo) Scanner requests
GET /admin/config.phpon a candidate host and confirms it is a FreePBX admin panel via body-text matchers. - Scanner extracts the FreePBX version string from the response body and compares it against the known-vulnerable ranges (
< 16.0.44.0/< 17.0.23.0). - If the version falls in the vulnerable range, the target is flagged as susceptible to CVE-2025-66039.
- (Exploitation, not implemented in this repo, per public advisories) With
AUTHTYPE=webserverconfigured, an attacker crafts an HTTP request with a forgedAuthorizationheader claiming an administrative identity and submits it to the FreePBX admin panel, which trusts the header and grants an authenticated administrator session without validating real credentials.
Impact
An attacker exploiting the underlying bypass (not the detection template itself) gains full administrative access to the FreePBX web UI, enabling arbitrary changes to call routing, extensions, trunks, voicemail, and potentially command execution through admin-only modules — a complete compromise of the PBX’s confidentiality, integrity, and availability.
Environment / Lab Setup
Target: FreePBX 16 (< 16.0.44) or FreePBX 17 (< 17.0.23), framework module,
configured with AUTHTYPE=webserver
Admin panel reachable at http(s)://<target>/admin/config.php
Attacker tooling:
- Nuclei (https://github.com/projectdiscovery/nuclei)
- Templates: CVE-2025-66039.yaml (this CVE), CVE-2025-61675.yaml, CVE-2025-61678.yaml (sibling CVEs, included in same repo)
Proof of Concept
PoC Script
See
CVE-2025-66039.yamlin this folder (version-fingerprinting Nuclei template only — no exploitation payload for the auth bypass itself).
| |
Detection & Indicators of Compromise
GET /admin/config.php with response containing "FreePBX Administration",
"Operator Panel", or "User Control Panel" and an extractable version string
in the vulnerable range (< 16.0.44.0 or < 17.0.23.0).
For actual exploitation (not in this repo): admin panel logins/session
creation with no corresponding entry in FreePBX's normal auth log, or
logins correlating with anomalous/forged Authorization headers when
AUTHTYPE=webserver.
Signs of compromise:
- Administrator sessions established without a matching successful login event in FreePBX’s authentication logs.
- Unexpected changes to extensions, trunks, call routing, or voicemail configuration.
AUTHTYPE=webserverenabled on internet-facing FreePBX instances.- Scan traffic hitting
/admin/config.phpfrom external IPs followed shortly by administrative actions.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade FreePBX framework module to 16.0.44+ (FreePBX 16) or 17.0.23+ (FreePBX 17), where the forged-Authorization-header bypass is patched. |
| Interim mitigation | Avoid AUTHTYPE=webserver unless the front-end web server independently and securely authenticates the Authorization header; do not expose the FreePBX admin panel to the internet; restrict access via VPN/firewall/IP allowlisting; monitor login/session logs for anomalies. |
References
Notes
Mirrored from https://github.com/cyberleelawat/FreePBX-Multiple-CVEs-2025 on 2026-07-06. The repository provides only Nuclei detection/fingerprinting templates for CVE-2025-66039 (and two sibling CVEs, CVE-2025-61675 and CVE-2025-61678, also included in this mirror); there is no actual exploitation code for the authentication bypass itself, only version-based vulnerability identification.