Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-66491 — The Joomla extension PhocaCommander is vulnerable to Path Traversal in the getSource function - CVSS 8.2 | Kitploit
Tools/GitHubGitHub/toanln-cov/cve-2026-66491
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb SecurityPenetration Testing
GitHubtoanln-cov/cve-2026-66491

CVE-2026-66491

The Joomla extension PhocaCommander is vulnerable to Path Traversal in the getSource function - CVSS 8.2

View Repository
101 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Arbitrary File Read via getSource() in PhocaCommander

PhocaCommander ≤ 6.1.3 — Authenticated Admin Path Traversal, No CSRF Required

CVE CVSS v4.0 CWE-22 Affected Researcher


SUMMARY

An arbitrary file read vulnerability exists in PhocaCommander's file editor endpoint. The getSource() function decodes a base64-encoded filename parameter and passes it directly to file_get_contents() with no path containment check. An authenticated administrator can read any file accessible to the web server process - including files outside the webroot - simply by sending a GET request. No CSRF token is required.

Exploitation leaks Joomla's database credentials and secret key from configuration.php, and can read system files such as /etc/passwd via path traversal sequences (e.g. ../../../../etc/passwd).


AFFECTED VERSIONS

COMPONENTVULNERABLETESTED ONFIXED
PhocaCommander1.0.0 – 6.1.3Joomla 5.4.7 + PhocaCommander 6.1.3 (PHP 8.2 / Apache)6.1.4

VULNERABILITY DETAILS

Authentication required: Administrator session (no CSRF token required - GET request)

File: administrator/components/com_phocacommander/models/phocacommanderedit.php

Root Cause

getSource() decodes filename from base64 and concatenates it directly onto JPATH_ROOT, then reads the file with no containment check:

PHOCACOMMANDEREDIT.PHP — VULNERABLE CODE

root@kitploit:~
public function getSource($fileName) {
    $fileName = base64_decode($fileName); // ← attacker-controlled
    $item = new stdClass;
    if (PhocaCommanderHelper::fileExists(JPATH_ROOT . '/' . $fileName)) {
        $item->source = file_get_contents(JPATH_ROOT . '/' . $fileName); // ← no containment check
    }
    return $item;
}

fileExists() uses is_file(Path::clean($file)). Path::clean() normalizes slashes but does not strip ../ sequences, so traversals escape the webroot unchecked.

The codebase contains getContainedRealPath() in helpers/phocacommander.php that performs proper realpath()-based containment. It is called by save() and download() but was never added to getSource(). Additionally, the controller's edit() method is dispatched via GET, so standard CSRF token checks do not apply — an active admin session cookie is sufficient to trigger arbitrary file reads.


PROOF OF CONCEPT

Scenario 1 — Read /etc/passwd via Path Traversal Outside Webroot

1. Log in to the Joomla administrator panel

Authenticate via the admin login page to obtain a valid session cookie. No further privileges beyond a standard admin session are required.

2. Read /etc/passwd via path traversal - outside webroot

Send the following GET request with the base64-encoded traversal path:

root@kitploit:~
GET /administrator/index.php?option=com_phocacommander&task=phocacommanderedit.edit&filename=Li4vLi4vLi4vLi4vZXRjL3Bhc3N3ZA==
Cookie: [admin session]

filename decoded: Li4vLi4vLi4vLi4vZXRjL3Bhc3N3ZA== → ../../../../etc/passwd

Resolved path: /var/www/html/../../../../etc/passwd = /etc/passwd

The editor renders the full contents of /etc/passwd, confirming read access outside the webroot.

REQUEST / RESPONSE

Burp Suite request and response showing /etc/passwd contents rendered in the Joomla editor


IMPACT

  1. System file disclosure — SSH keys, and config files of co-hosted applications are all reachable (if readable by the web server process)
  2. No interaction required — The attack is a single GET request, no CSRF token, no form submission, no victim interaction needed
  3. Privilege escalation chain — The leaked secret key enables forging Joomla tokens offline, opening further attack surface against the target site

REFERENCES

  • CVE: https://www.cve.org/CVERecord?id=CVE-2026-66491
  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-66491
  • Vendor Repository: https://github.com/PhocaDesign/PhocaCommander
Download Tool