llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · leantime/leantime

GHSA-V77X-58XV-3FMX

Missing Authorization on Install/Update Service Allows Any Authenticated User to Trigger Database Migrations

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición50 dDesde la divulgación, 2 oct 2026, 10:34 a. m.
Detección47 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. No hay versión corregida: aplique mitigaciones.
Sin prisa pero sin pausa, como yo en el páramo.Traje la llave inglesa: esto se arregla.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
2 oct 26
19 nov 26
21 nov 26
2 oct 26
15 oct 26
27 oct 26
9 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-V77X-58XV-3FMX divulgada · CVSS 5.4 (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

The `Install::runUpdate()` and `Install::runInstall()` methods in `Leantime\Domain\Install\Services\Install` are annotated with `@api` (exposing them via JSON-RPC) but have no `#[RequiresPermission]` attribute and no internal authorization check. Any authenticated user - including the lowest-privilege role (editor, role 20) - can trigger database migrations via the JSON-RPC endpoint.

Severity

Medium - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Affected products

  • Ecosystem: Composer
  • Package name: leantime/leantime
  • Affected versions: <= 3.9.8
  • Patched versions: None

Details

Vulnerable code

`app/Domain/Install/Services/Install.php`:

/**
 * @api   <-- exposed via JSON-RPC, no RequiresPermission
 */
public function runUpdate(): bool|array
{
    session()->forget('db-version');
    return $this->installRepo->updateDB();
}

/**
 * @api   <-- exposed via JSON-RPC, no RequiresPermission
 */
public function runInstall(array $values): bool
{
    return $this->installRepo->setupDB($values);
}

Neither method has a `#[RequiresPermission]` attribute. The `PermissionEnforcer` returns immediately (no-op) when no attribute is present (line 47-48 of `PermissionEnforcer.php`).

Attack scenarios

Scenario 1: Denial of Service via repeated migration execution
A low-privilege user calls `runUpdate()` repeatedly via JSON-RPC. Each call clears the cached db-version and re-runs all migration scripts against the production database. Depending on migration complexity and database size, this causes significant load, potential table locks, and service degradation.

Scenario 2: Premature migration during version upgrade
When a new Leantime version is deployed but the administrator has not yet completed pre-upgrade steps (backups, maintenance window), a low-privilege user can trigger migrations prematurely by calling `runUpdate()`, potentially causing data inconsistency if the upgrade requires a specific sequence.

Scenario 3: runInstall attempt
While `runInstall()` returns false on an already-initialized database, it is still callable - the authorization gap exists regardless of the runtime outcome.

Additionally, `Cron::runScheduledTasks()` is exposed under the same pattern (no `#[RequiresPermission]`), allowing any authenticated user to trigger scheduled task execution on demand.

Reproduction
  1. Deploy Leantime v3.9.8 with Docker
  2. Create an admin account and a low-privilege (editor, role 20) account
  3. Create an API key for the low-privilege user
  4. Run:
curl -sS http://target/api/jsonrpc \
  -H "x-api-key: lt_<user>_<key>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"leantime.rpc.install.install.runUpdate","params":{},"id":1}'
# Returns: {"jsonrpc":"2.0","result":true,"id":1}

Verified on Leantime v3.9.8.

Remediation

Add admin-only authorization to all Install service methods:

#[RequiresPermission(InstallPermissions::MANAGE, global: true)]
public function runUpdate(): bool|array
{
    session()->forget('db-version');
    return $this->installRepo->updateDB();
}

Or remove the `@api` annotation from the Install service class entirely, as these operations should never be accessible via API.

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:N
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:L
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
leantime/leantime≤ 3.9.8
3.9.8
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistleantime/leantime
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/Leantime/leantime/security/advisories/GHSA-v77x-58xv-3fmx

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