llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · nilsteampassnet/teampass

GHSA-7WVW-WXQX-V364

Admin actions in admin.queries.php skip the session-key check, letting a same-site forged request toggle the API, delete old logs or start/stop the WebSocket server

Parche disponible
Descargar PNG JSON
CVSS 3.1
4.2
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión3.2.4.2
Exposición13 dDesde la divulgación, 8 nov 2026, 3:41 a. m.
Detección11 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Hoy toca mantenimiento, no heroísmo.Rumio tranquila, pero no me olvido de esta.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
8 nov 26
19 nov 26
21 nov 26
8 nov 26
11 nov 26
15 nov 26
18 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-7WVW-WXQX-V364 divulgada · CVSS 4.2 (GitHub)
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

`app/sources/admin.queries.php` dispatches the actions of the administration pages from a single `switch`. Most cases start by comparing the posted `key` with the session key (`$post_key !== $session->get('key')`). That per-request token is what proves a request comes from a TeamPass page. Ten cases skipped the check:

  • the four state-changing actions reported here: `save_api_status`, `clean_old_logs`, `websocket_start` and `websocket_stop`;
  • two actions that only write a log row: `test_encryption` and `export_statistics`;
  • four read-only actions: `get_dashboard_stats`, `get_system_status`, `get_system_health` and `websocket_status`.

A POST that carried a signed-in administrator's session cookie but no key ran them.

Details

Paths and line numbers are those of 3.2.4.1 (the file is identical on the development branch).

  1. `public/sources/admin.queries.php` loads `app/sources/admin.queries.php`. The CSRF protector (`csrfProtector::init()`) runs only in the front controller `public/index.php`. Nothing checks `Origin`, `Referer` or `Sec-Fetch-*` on `sources/*.queries.php`, so the session key is the only intent check there.
  2. The file-level gate (`:77-86`) checks the session, the `admin` page right, a user id and a non-empty session key. It proves that an administrator is signed in, not that the administrator sent the request.
  3. Cases without the key check:

| Line | Case | Effect | Called by the UI |
|---|---|---|---|
| 387 | `save_api_status` | Writes `misc` `admin/api` (REST API on/off) from `status`; when enabling with an empty `browser_extension_fqdn`, fills it from `cpassman_url` | No |
| 4188 | `websocket_start` | Starts the WebSocket server (`exec()` of `app/websocket/bin/server.php`, or `sudo systemctl start teampass-websocket`) | Yes, with the key |
| 4314 | `websocket_stop` | Stops it (`posix_kill()` on the process listening on the configured port, or `sudo systemctl stop teampass-websocket`) | Yes, with the key |
| 4413 | `clean_old_logs` | Deletes the `log_items` and `log_system` rows older than 90 days | No |
| 4470 | `test_encryption` | Writes one `log_system` row | No |
| 4544 | `export_statistics` | Writes one `log_system` row and returns a CSV | No |
| 3227, 3467, 3518, 4106 | `get_dashboard_stats`, `get_system_status`, `get_system_health`, `websocket_status` | Read-only | Yes, with the key |

  1. Every response except the CSV is encrypted with the session key, and the same-origin policy blocks cross-origin reads, so a forged request is blind.

What limits the attack. Since 3.1.2 the session cookie is explicitly set to `SameSite=Lax` (`app/vendor/teampassclasses/sessionmanager/src/SessionManager.php:80-86`).
- A cross-site POST does not carry the cookie. Chrome's two-minute "Lax + POST" exception applies only to cookies without a SameSite attribute.
- The handlers read POST only, so a top-level GET navigation does nothing.

An attacker therefore needs a page on the same site: another host under the same registrable domain, such as a sibling subdomain (with the same scheme, on Chromium). A browser that ignores SameSite also works. Script running on the TeamPass origin itself gains nothing from this flaw, because it can read the key from the page.

Affected versions.
- `save_api_status` has had no key check since 3.0.0.0.
- The other cases arrived in 3.1.5.4 (dashboard and quick actions) and 3.1.7.0 (WebSocket control).
- In 3.0.10 to 3.1.1 the `ini_set('session.cookie_samesite', 'Lax')` line of `index.php` is commented out and the session cookie has no SameSite attribute, unless `php.ini` sets `session.cookie_samesite`. On those versions, a cross-site POST could also toggle the API.

Proof of concept
  1. Sign in as an administrator and note the `PHPSESSID` cookie.
  2. With that cookie only, and no `key` field, send:
  3. `type=clean_old_logs` deletes the log rows older than 90 days in the same way.
  4. As a control, `type=network_get_rules` without a key returns `key_is_not_correct`.
Impact

Through a page on the same site, an attacker can make a signed-in administrator's browser do the following:
- Turn the REST API on or off.
- Turning it on grants nothing by itself. `/api/authorize` still needs an account that is allowed to use the API, its password and its personal API key, and token sign-in needs a valid token.
- Turning it off stops the API clients (browser extension, scripts).
- Delete the item and system logs older than 90 days. This covers password history in `log_items`, old authentication failures and old administration events. The deletion is itself logged, as `admin_action/clean_old_logs` under the administrator's account.
- Start or stop the WebSocket server. It only carries real-time updates, and no security control depends on it. The commands are fixed: nothing from the request reaches the shell.

No data is disclosed and no privilege is gained.

Patches

Fixed in 3.2.4.2. Before doing anything, every case of `admin.queries.php` now refuses a request whose `key` differs from the session key, as the other cases already did. A unit test (`tests/Unit/AdminQueriesSessionKeyTest.php`) checks this on every case of the switch.

Workarounds
  • Serve TeamPass on a registrable domain that hosts no other site where third parties can publish content.
  • Otherwise, sign out of TeamPass before browsing the sibling sites.

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:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:L
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
nilsteampassnet/teampass≥ 3.0.0.0 < 3.2.4.2
3.0.0.0
3.2.4.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistnilsteampassnet/teampass
Corregida 3.2.4.2 — —
Versiones corregidas3.2.4.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/nilsteampassnet/TeamPass/security/advisories/GHSA-7wvw-wxqx-v364

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