GHSA-X2H4-PG9F-MJ6X
Password change invalidates no session and no remember-me token
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-X2H4-PG9F-MJ6X divulgada · CVSS 7.4 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Changing a password in LiveHelperChat invalidates nothing. Neither the PHP session nor the long lived `lhc_rm_u` cookie is affected, and the cookie alone authenticates without any session.
The product owns the revocation routine: `lib/core/lhuser/lhuser.php:291` deletes the user's `lh_users_remember` rows inside `logout()`, which eight call sites reach, and `modules/lhuser/delete.php:52` repeats the DELETE when an account is removed.
No password write path calls it. A search across `lhuservalidator.php`, `lhrestapiuservalidator.php`, `remindpassword.php`, `updatepassword.php`, `edit.php` and `account.php` for `session_destroy`, `session_regenerate_id`, `logout()` or `lh_users_remember` returns two hits, both writes of `pswd_updated`. The only session action anywhere on a password path is `setLoggedUser()` regenerating the id of the request's own session (`lhuser.php:215`); other sessions and the token are untouched.
The token carries no password material: `lhuser.php:597` hashes the user id, the row id, two salts, the client IP and the User-Agent, so a changed password cannot invalidate it arithmetically either.
Result: a stolen session or remember-me cookie survives the victim's password change. It ends only on an explicit logout, an administrator's force logout, disabling or deleting the account, or the optional password expiry policy.
Details
`lhuser.php:597` builds the cookie as `sha1($userid.'_'.$rusr->id.$salt2.$salt1.IP.UA)` and `:598` sets it with the four argument form of `setcookie`, so it carries no `HttpOnly`, no `Secure` and no `SameSite`, and it is valid for 365 days. `validateRemember()` never consults `lh_users_remember.mtime`, and no scheduled task prunes the table. `lib/models/lhuser/erlhcoreclassmodeluser.php:65` writes `pswd_updated` on every password change, and `modules/lhuser/login.php:199` already reads it and calls `logout()` on the interactive path when the optional expiry policy is set, but `validateRemember()` never looks at it. By contrast the visitor tracking cookie in `modules/lhchat/start.php:79` is set with conditional `Secure` and `HttpOnly`, which shows the product has the idiom and applies it to the lower value cookie.
Reachable in a stock install.
The cookie is bound to the client IP and the User-Agent, and an attacker who takes the cookie from the browser also reads the User-Agent. The IP constraint is weak either way: with `proxy_mode` on, `lib/core/lhcore/lhipdetect.php:9-10` trusts `HTTP_CF_CONNECTING_IP` and `:11-16` the leftmost `X-Forwarded-For`, neither against a proxy list; with it off behind a proxy, `REMOTE_ADDR` is the same address for every client.
Peer projects invalidate on password change: Laravel shipped this as a security advisory (GHSA-p62r-7637-3wwc, CWE-384), WordPress keys its auth cookie on `substr($user->user_pass, 8, 4)`, and Django (`salted_hmac` over the password), Symfony (`signature_properties` defaulting to `password`) and Devise (`authenticatable_salt`) all derive the token from the password hash. OWASP ASVS 4.0.3 V3.3.3 requires, at L2 and L3, that the application offer a way to terminate all other active sessions after a password change; LiveHelperChat offers none.
Proof of concept
LiveHelperChat 4.94v (`d8787d04`), Docker, default configuration, throwaway operator account.
- Log in with the "remember me" checkbox, which `modules/lhuser/login.php:152` evaluates, and capture the cookie. Without that checkbox no token is ever created.
Set-Cookie: lhc_rm_u=QNbSyDRWqKje3UnWoZaZC8RFDm1vjw%3A7%3A188ee8f3...;
expires=Fri, 08 Oct 2027 ...; Max-Age=31536000; path=/
Set-Cookie: PHPSESSID=...; path=/; HttpOnly; SameSite=Lax- Change that account's password through the application, then confirm the change took effect.
bcrypt hash before $2y$10$vXsq...
bcrypt hash after $2y$10$kbKC...
login with the old password -> rejected- Send the cookie captured in step 1, with no session cookie at all.
GET /index.php/site_admin/user/account
Cookie: lhc_rm_u=<captured value>
HTTP/1.1 200 OK
<input ... name="Username" value="<victim>">Controls
- The same cookie with one byte of the hash flipped is rejected with a 302 to the login page and an empty body.
- The same cookie from a different User-Agent is not authenticated.
- `lh_users_remember` still holds the row; logging out through the UI removes it, which shows the deletion path works and is simply not wired to the password change.
Live-verified: a remember-me cookie captured before the password change authenticated after it, with the old password already rejected.
Impact
- A stolen session or remember-me cookie survives the victim's password change, so the usual remediation does not end the compromise.
- The cookie authenticates on its own for a year, with no server side expiry and no per device revocation.
- It carries no `HttpOnly`, so any script execution in the origin reads it.
- No application log records the replay: `lh_users_login` stays unchanged, only `lh_users_remember.mtime` is bumped.
- Issuing a fresh cookie does not invalidate the previous one: after rotation the original value still authenticated.
- The administrator's force logout clears it, but only once one of the victim's sessions polls `chat/syncadmininterface`, and nothing tells the victim that a password change does not.
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.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistremdex/livehelperchat |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/LiveHelperChat/livehelperchat/security/advisories/GHSA-x2h4-pg9f-mj6xLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
