GHSA-q4rm-m6xh-5pv7 CVE-2026-90935
Froxlor customer can create MySQL databases on disallowed servers via Mysqls.add API
- Severity
- 5.3 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.29%
- Chance of exploitation in the next 30 days. Higher than 22.21% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-285 Improper Authorization
- Fix
2.3.7- Upgrade froxlor/froxlor to this version or later
Description
Summary
The Mysqls.add API command (lib/Froxlor/Api/Commands/Mysqls.php) accepts a customer-controlled mysql_server parameter and only validates that the value is numeric and that the server index exists in userdata.inc.php. It never checks the value against the calling customer's allowed_mysqlserver allowlist. A customer can therefore create a database, plus a MySQL user with a password they choose, on any MySQL server the operator has configured — including servers that were explicitly excluded from that customer (e.g. a separate cluster, premium-tier host, or another tenant pool). The same allowed_mysqlserver check is correctly enforced in MysqlServer::get() / MysqlServer::listing() and in the customer-facing UI (customer_mysql.php), confirming the omission is a bug, not by-design.
Details
Vulnerable code path — lib/Froxlor/Api/Commands/Mysqls.php:69-99 (add()):
public function add()
{
if (($this->getUserDetail('mysqls_used') < $this->getUserDetail('mysqls') || ...) {
...
$customer = $this->getCustomerData('mysqls'); // line 80
$dbserver = $this->getParam('mysql_server', true, // line 81 — user-controlled
$this->getDefaultMySqlServer($customer));
...
$dbserver = Validate::validate($dbserver, ..., '/^[0-9]+$/', ...); // line 92 — numeric only
Database::needRoot(true, $dbserver, false); // line 93 — root ctx for ANY index
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
if (!is_array($sql_root)) { // line 97 — only existence check
throw new Exception("Database server with index #" . $dbserver . " is unknown", 404);
}
...
$username = $dbm->createDatabase($newdb_params['loginname'], $password,
$dbserver, ...); // line 116/118 — DB+user created
...
Database::pexecute($stmt, ["customerid"=>$customer['customerid'], ..., "dbserver"=>$dbserver], ...);
}
}
The $customer['allowed_mysqlserver'] field IS read on line 80 but is only consumed by getDefaultMySqlServer() (lines 566-573) to compute a default when the request omits mysql_server. As soon as the client supplies the parameter, the default path is skipped and no further authorization gate runs.
Cross-file evidence the check is intended elsewhere:
lib/Froxlor/Api/Commands/MysqlServer.php:319-323—get()rejects with HTTP 405 when$dbserveris not inallowed_mysqlserver:if ($this->isAdmin() == false) { $allowed_mysqls = json_decode($this->getUserDetail('allowed_mysqlserver'), true); if ($allowed_mysqls === false || empty($allowed_mysqls) || !in_array($dbserver, $allowed_mysqls)) { throw new Exception("You cannot access this resource", 405); } ... }lib/Froxlor/Api/Commands/MysqlServer.php:252-257— same allowlist filter onlisting().customer_mysql.php:222— UI rejects withResponse::dynamicError('No permission')whenempty($allowed_mysqlservers).
Chain of execution (attacker → impact):
- Customer authenticates to
api.phpwith apikey/secret. The only API gate iscust_api_allowed;allowed_mysqlserveris not consulted at auth time. - Customer sends JSON
{"command":"Mysqls.add","params":{"mysql_password":"<valid>","mysql_server":<disallowed_idx>}}. Mysqls.php:71quota check passes (mysqls_used < mysqls).Mysqls.php:80getCustomerData('mysqls')returns the caller's own row.Mysqls.php:81$dbserveris set from the request (default-fallback path skipped).Mysqls.php:92numeric regex passes.Mysqls.php:93-99Database::needRoot(true, $dbserver, false)switches to the root context of the attacker-chosen server; existence check passes.Mysqls.php:116/118DbManager::createDatabase(...)runs against the disallowed server using stored root credentials, creating the DB and granting the supplied password to<loginname>_<sqlN>(DbManager.php:177-218).Mysqls.php:127-141inserts a row intoTABLE_PANEL_DATABASESwith the attacker'scustomeridand the disalloweddbserver, allowing later management viaMysqls.get/update/delete(which only filter bycustomeridfor non-admins, e.g.Mysqls.php:282).
PoC
Preconditions on the target instance:
- ≥2 MySQL servers configured in
lib/userdata.inc.php(e.g. index 0 default, index 1 internal/premium). - Customer X with
allowed_mysqlserver=[0],cust_api_allowed=1,mysqls > 0, and an issued API key (apikey:secret).
Request — customer creates a database on server 1, which is not in their allowlist:
curl -k -u 'CUST_APIKEY:CUST_SECRET' \
-H 'Content-Type: application/json' \
-X POST \
-d '{"command":"Mysqls.add","params":{"mysql_password":"ValidP@ssw0rd!","mysql_server":1}}' \
https://froxlor.example.com/api.php
Expected (mirroring MysqlServer.get() behaviour): HTTP 405 — "You cannot access this resource".
Actual: HTTP 200 with the full database record, e.g.:
{"data":{"id":42,"customerid":<cust_id>,"databasename":"<loginname>_sql1","dbserver":1,...}}
Verify the credentials work on the forbidden server:
mysql -h server1.host -u <loginname>_sql1 -p # password: ValidP@ssw0rd!
mysql> SHOW DATABASES; # the new DB is present
mysql> USE <loginname>_sql1; # full access to the newly-created DB
The customer can subsequently manage the DB via Mysqls.get, Mysqls.update, and Mysqls.delete — those non-admin code paths filter only by customerid (Mysqls.php:282-289, Mysqls.php:380-391), which matches.
Impact
- Bypass of the per-customer MySQL-server allowlist (
allowed_mysqlserver) enforced by the admin/reseller. The authorization model is fully defeated for theaddoperation. - The customer obtains valid MySQL credentials on a server the operator explicitly excluded for them — possibly an internal/separate cluster, billing tier, premium-only host, or a server provisioned for a different tenant pool.
- The customer can persist a DB on the forbidden server (resource and policy bypass), then read/write data there, and continue to manage it through
Mysqls.update/Mysqls.delete. - Impact is bounded: privileges granted by
DbManager::grantPrivilegesToapply only to the new<loginname>_sqlNdatabase, so no cross-tenant data exposure on the forbidden server. The damage is policy bypass, resource consumption on the forbidden server, and credential persistence there.
Recommended Fix
Mirror the allowlist check already present in MysqlServer::get(). After the numeric validation on Mysqls.php:92, before Database::needRoot(...), add for non-admin callers:
// validate whether the dbserver exists
$dbserver = Validate::validate($dbserver, html_entity_decode(lng('mysql.mysql_server')), '/^[0-9]+$/', '', 0, true);
// enforce per-customer allowed_mysqlserver allowlist (parity with MysqlServer::get())
if (!$this->isAdmin()) {
$allowed = json_decode($customer['allowed_mysqlserver'] ?? '[]', true);
if (!is_array($allowed) || empty($allowed)
|| !in_array((int)$dbserver, array_map('intval', $allowed), true)) {
throw new Exception('You cannot access this resource', 405);
}
}
Database::needRoot(true, $dbserver, false);
Audit Mysqls::update(), Mysqls::delete(), and Mysqls::get() for the same gap: those endpoints accept mysql_server and ultimately call Database::needRoot(true, $result['dbserver'], false) on the row's stored value. Once the row exists with a forbidden dbserver, those paths execute against the forbidden server unchallenged. Consider rejecting any non-admin operation whose target row's dbserver is outside allowed_mysqlserver, even if the row already exists, to defend in depth.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| froxlor/froxlor | < 2.3.7 |
2.3.7 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
froxlor/froxlor Packagist → 2.3.7
- composer
composer require froxlor/froxlor:^2.3.7
Severity breakdown
CVSS 4.0 5.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/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
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- Low
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Not defined
- Scope
- X
CVSS 3.1 4.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Weakness
CWE-285: Improper Authorization
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that you perform access control checks related to your business logic. These checks may be different than the access control checks that you apply to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-7788-ghfq-c6mh Froxlor: Credential and 2FA secret disclosure via Froxlor API endpoints | Critical | Also affects froxlor/froxlor |
| GHSA-xpr4-8vp6-c87j Froxlor has CSRF Vulnerability in AJAX Endpoint — Missing Cross-Site Request Forgery Protection | Medium | Also affects froxlor/froxlor |
| GHSA-5rw4-4665-cvwf Froxlor DomainZones.add allows DNS zone-file RR injection via record/type fields | Medium | Also affects froxlor/froxlor |
| GHSA-w27m-rmmf-g5w4 Froxlor: Second-Order SQL Injection via `Admins.add` `ipaddress` Parameter Allows Full Database Exfiltration | High | Also affects froxlor/froxlor |
| GHSA-43gm-9rr3-cx7g Froxlor: Stored XSS in DNS TXT Record Content Allows Customer-to-Admin Account Takeover | High | Also affects froxlor/froxlor |
| GHSA-mr9h-45p9-fg8h Froxlor: Authenticated customers can read other customers' allowed sender aliases | Medium | Also affects froxlor/froxlor |
| GHSA-f9rx-7wf7-jr36 Froxlor's API Authentication bypasses 2FA Authentication | High | Also affects froxlor/froxlor |
| GHSA-37m5-m4q3-fc6x Froxlor: BIND Zone File Injection via TXT Record Content | High | Also affects froxlor/froxlor |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor