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-66492 — The Joomla extension PhocaCommander is vulnerable to Path Traversal in the file upload action - CVSS 6.1 | Kitploit
Tools/GitHubGitHub/toanln-cov/cve-2026-66492
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubtoanln-cov/cve-2026-66492

CVE-2026-66492

The Joomla extension PhocaCommander is vulnerable to Path Traversal in the file upload action - CVSS 6.1

View Repository
131 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

Path Traversal in File Upload Destination

PhocaCommander ≤ 6.1.3 — Authenticated Admin Writes Files Outside Webroot

CVE CVSS CWE-22 Affected Researcher


SUMMARY

The file upload handler in PhocaCommander constructs the destination path from an attacker-controlled base64-encoded folder parameter without any path containment validation. An authenticated administrator can upload files to arbitrary locations outside the webroot that are writable by the web server process.

Confirmed in the lab: uploading with folder=Li4vLi4vLi4vdG1w (= ../../../tmp) places the uploaded file at — outside — owned by . In production PHP-FPM environments this can be chained to achieve remote code execution.

/tmp/
/var/www/html/
www-data

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 + CSRF token)

File: administrator/components/com_phocacommander/helpers/fileupload.php — realMultipleUpload()

Root Cause

realMultipleUpload() decodes the folder POST parameter from base64 and passes it directly into a Path::clean() concatenation, which is then used as the upload destination without any containment check.

FILEUPLOAD.PHP — VULNERABLE CODE

root@kitploit:~
$folder = $app->getInput()->get('folder', '', '', 'string');
$folder = base64_decode($folder);         // ← attacker-controlled

$path = JPATH_ROOT;                       // = /var/www/html

if (isset($folder) && $folder != '') {
    $pathFolder = Path::clean($path . '/' . $folder . '/');
    // e.g. Path::clean('/var/www/html/../../../tmp/')
    // = '/tmp/' — outside the webroot, no error thrown
}

// ...
File::upload($file['tmp_name'], $pathFolder . strtolower($file['name']));

Path::clean() normalizes directory separators but does not resolve or strip ../ sequences. The resolved path is passed directly to File::upload() with no subsequent boundary check.

Upload Extension Allowlist

The handler enforces an extension allowlist (images, documents, archives, text files) and blocks server-executable types such as .php and .htaccess. However, many file types allowable by the whitelist — including shell scripts, cron job definitions, and configuration fragments — can cause significant harm when written to sensitive OS paths.


PROOF OF CONCEPT

Scenario 1 — Arbitrary File Write to /tmp via Traversal in folder Parameter

1. Log in to the Joomla administrator panel and obtain CSRF token

Authenticate via the admin login page. Retrieve the Joomla CSRF token from any admin page — it appears as a hidden form field or can be extracted from the page source.

GET request extracting CSRF token from admin panel

2. Upload file with traversal in folder parameter

Send a multipart POST request to POST /administrator/index.php?option=com_phocacommander&task=phocacommanderupload.multipleupload with the file content in the file field and the base64-encoded traversal path Li4vLi4vLi4vdG1w (= ../../../tmp) in the folder field. The server responds with HTTP 200 and {"jsonrpc":"2.0","result":"OK","code":200,"message":"Success: ","details":"Files uploaded"}.

REQUEST / RESPONSE

POST upload request with traversal folder parameter and 200 OK response

3. Confirm file written to /tmp — outside the webroot

The file is confirmed at /tmp/upload_test.txt, owned by www-data, outside /var/www/html/.

Terminal ls -la /tmp showing upload_test.txt owned by www-data


IMPACT

  1. Arbitrary file write outside webroot — any path writable by www-data can receive attacker-chosen content, including paths used by the OS scheduler, SSH daemon, and other services
  2. Potential RCE in PHP-FPM environments — uploading a .txt file containing PHP code combined with a .user.ini (auto_prepend_file) to a web-accessible directory triggers PHP execution on the next request to that directory

REFERENCES

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