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

GHSA-G84G-6GGW-J4G6

Arbitrary file read, delete and write via theme import mass assignment

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:N/AC:L/PR:L/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ón39 dDesde la divulgación, 12 oct 2026, 1:53 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
20 nov 26
12 oct 26
22 oct 26
1 nov 26
10 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-G84G-6GGW-J4G6 divulgada · CVSS 8.8 (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

`modules/lhtheme/import.php:80` applies the uploaded theme JSON to the model with `$widgetTheme->setState($data)`, and `lib/core/lhcore/lhdbtrait.php:6-11` is a bare loop:

foreach ($properties as $key => $val) { $this->$key = $val; }

The model carries `#[\AllowDynamicProperties]`, so every key in the file becomes a property, including ones the import form never offers.

Three sinks follow from that one assignment. `lib/models/lhabstract/erlhabstractmodelwidgettheme.php:129` reads `file_get_contents($this->{$attr.'_path'}.'/'.$this->$attr)`, and `modules/lhtheme/export.php:34` returns that content base64 encoded. `:177-178` passes the same pair to `unlink()`. And `logo_image_pending` reaches `afterSave():232-236`, which calls `movePhoto($attr)` with the default `$isLocal = false`, so the upload lands through `moveUploadedFile()`, which applies no extension check at all.

Result: an account holding the single `administratethemes` permission reads any readable file, deletes files in any writable directory, and writes an executable `.php` into the web root.

Details

`import.php:80` hands the decoded upload to `setState()`, which applies it without a whitelist, so `logo_image`, `logo_image_path` and `logo_image_pending` are attacker controlled. `erlhabstractmodelwidgettheme.php:129` builds the read path from the first two and `export.php:34` emits the bytes, gated only by `export.php:33` requiring `logo_image_url` to be non empty. `:177` tests and `:178` deletes the same pair, concatenated without a separator, so the path value has to end in a slash itself. `afterSave():232-236` is the write path: `movePhoto()` takes `$isLocal = false` by default and routes to `moveUploadedFile()`, which has no extension allowlist, while the local branch used by `import.php:106` is constrained by the extension list at `import.php:93` and by `isPhotoLocal()`.

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

`lhtheme/administratethemes` (`modules/lhtheme/module.php:77`) is one grantable checkbox. The Operators role the installer creates receives only `personaltheme` and `use_operator` from this module (`modules/lhinstall/install.php:3052`, `:3058`). The holder cannot list users, read chats or open the system configuration, all three refused live.

The theme id is a small sequential integer. The role cannot list widget themes, so the id is found by walking `theme/export/<n>`; a wrong id returns 503 and writes one `lh_audits` row, which is the only noisy step.

Proof of concept

LiveHelperChat 4.94v (`d8787d04`), Docker, default configuration. Attacker is `chk08`, whose role holds exactly one `lh_rolefunction` row: `lhtheme` / `administratethemes`.

  1. Import a theme file carrying the path attributes. The endpoint takes multipart form data with a `themefile` whose name ends in `.json`.
curl -b jar -F csfr_token=<token> -F themefile=@theme.json -F ImportTheme=Import \
     http://127.0.0.1:8020/index.php/site_admin/theme/import

theme.json: {"name":"chk08", "logo_image_path":"settings", "logo_image":"settings.ini.php"}

The response is the import form again and names no id; the id is found through `theme/export/<n>`.

  1. Export the theme and decode the embedded image.
GET /index.php/site_admin/theme/export/<id>   ->  logo_image_data, 18566 bytes decoded

sha256 decoded      fd220ba7a7caf2fdc4155b3af0dc730a94cf0fcf4357efc16550eca975eed752
sha256 in container fd220ba7a7caf2fdc4155b3af0dc730a94cf0fcf4357efc16550eca975eed752
                    /var/www/html/settings/settings.ini.php

The file holds `'secrethash' => 'GmwdTARq10BQ...'` and `'user' => 'root'`, `'password' => 'rootpw'`.

  1. `logo_image_path` of `../../../../etc` and `logo_image` of `passwd` returns 839 bytes starting `root:x:0:0:root:/root:/bin/bash`, outside the document root.
  1. Deletion needs a second attribute: either a valid `logo_image_data` with an allowed `logo_image_data_ext`, or `logo_image_pending`. With `logo_image_path` of `var/` including the trailing slash, the named file is gone after the import. A file owned by `root` with mode `0444` was deleted, because `unlink()` depends on the directory.
  1. `"logo_image_pending": true` with an uploaded `.php` writes it under `var/storagetheme/<y>/<m>/<d>/<id>/`, and a plain GET on that path returned the marker string with HTTP 200.
Controls
  1. An account in the stock Operators role is refused on `theme/import`, and no theme row appears.
  2. Anonymous requests on import and export redirect to the login form.
  3. A non-existent file yields `logo_image_data` of zero bytes.

Live-verified: one permission read `settings.ini.php` byte identically, read `/etc/passwd`, deleted a root owned file in the web root, and wrote and executed a `.php` file.

Impact
  • Code execution as the web server user, from a `.php` written through the import and fetched over HTTP.
  • Any readable file is exfiltrated, including `secrethash` and the database credentials; a 3.3 MB binary came out byte identical, the only ceiling being PHP's `memory_limit`.
  • Any file in a directory the web server user can write is deleted, regardless of its owner and mode.
  • Import, export, read, delete and the write leave no `lh_audits` row at all.

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:L
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-g84g-6ggw-j4g6

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