Live Helper Chat: SQL Injection in User and Role Deletion via the URL Path Segment
user/delete and permission/deleterole place the raw path segment into DELETE statements; an operator holding a single deletion permission runs stacked statements and grants its own role all rights.
Advisory ID: TP-2026-147
Product: Live Helper Chat (open-source live chat software for customer support on websites)
Vulnerability type: SQL injection (CWE-89)
CVE: not requested
CVSS 3.1: 7.2 (High) · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Vendor advisory: GHSA-gw84-2363-vr95
Affected versions: up to and including 4.94v (verified live: commit d8787d04)
Fixed in: 4.95v
Reported: 10 October 2026
Summary
Live Helper Chat is open-source live chat software for customer support on websites; users and roles are deleted in the admin area through user/delete and permission/deleterole. Both endpoints place the ID from the URL path without a cast into DELETE statements built with ezcQueryExpression::eq(), a method that concatenates its operands and binds nothing. The checks in front read other values: the ORM binds only a copy as a string, which MySQL coerces to a number, while the unmodified string continues to the DELETE statements. Because ATTR_EMULATE_PREPARES is set nowhere, the PDO default applies and a statement separator executes a second statement. An operator holding a single deletion permission writes to the database and grants its own role every module and function.
Root cause
ezcQueryExpression::eq() returns "{$value1} = {$value2}" and binds neither operand (lhc_web/ezcomponents/Database/src/sqlabstraction/expression.php:442-446).
lhc_web/modules/lhuser/delete.php places $Params['user_parameters']['user_id'] into twelve DELETE statements on lines 23 to 87, and lhc_web/modules/lhpermission/deleterole.php:15 and :20 do the same with role_id; lhc_web/lib/core/lhcore/lhmodule.php:33 takes the path segment with no cast.
The admin check at lhc_web/modules/lhuser/delete.php:13 casts inside the comparison only, and the ORM load at lhc_web/modules/lhuser/delete.php:18 binds the value as a string that MySQL coerces to a number, so 4 OR (SELECT SLEEP(1))=1 loads row 4.
At lhc_web/modules/lhpermission/deleterole.php:10 the guard reads $role->id, the value the ORM returned, while the raw request string reaches the DELETE statements.
lhc_web/modules/lhuser/groupassignuser.php:39 casts the same kind of parameter with (int) before the identical expr->eq() call, and ATTR_EMULATE_PREPARES is set nowhere, so a statement separator executes a second statement.
Proof of Concept
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
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
The response time follows the SLEEP value, and the stacked statement is committed before the request aborts with 503; after one re-login the same account reaches permission/roles, system/configuration and the edit form of the admin account. Verified on 4.94v (commit d8787d04) in Docker with MySQL 5.7.44 in the default configuration; the attacker's role holds exactly one permission, lhuser / deleteuser. The same reproduces through permission/deleterole with the permission lhpermission / delete, provided no group is assigned to the target role.
Impact
- Arbitrary write through stacked statements, demonstrated as a self-grant of all modules and functions, which yields full administrator access after one re-login.
- Arbitrary read through a boolean timing oracle, including the bcrypt hash of the admin account and the SMTP credentials in
lh_chat_config. - Every request consumes a deletable account or role, because loading and deleting the object precedes the raw statements.
- The stacked write is noisy: HTTP 503 plus a
web_exceptionrow inlh_auditscarrying the payload in cleartext.
References
Is Something Like This in Your Software?
Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.
