llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · vrana/adminer

GHSA-6PG3-CHWQ-WGQC

Adminer SQLite Database-List Drop Arbitrary File Deletion

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.1
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión5.4.3
Exposición135 dDesde la divulgación, 9 jul 2026, 6:18 a. m.
Detección134 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.
Échale un ojo a tu inventario, ¿dale?Ponle fecha: las tareas sin fecha son leyendas.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
9 jul 26
12 ago 26
21 nov 26
9 jul 26
12 ago 26
15 sept 26
19 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-6PG3-CHWQ-WGQC divulgada · CVSS 8.1 (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

Adminer SQLite Database-List Drop Arbitrary File Deletion

Summary

Adminer 5.4.3-dev allows an authenticated SQLite-mode user to delete arbitrary files writable by the PHP process through the database-list drop action. The SQLite driver validates file extensions when creating or renaming databases, but the database-list drop path passes submitted `db[]` values directly to `unlink()`.

Impact

An authenticated Adminer SQLite user with a valid CSRF token can submit an arbitrary relative file path in the database-list `db[]` field. If the PHP process can delete that path, Adminer unlinks it even when the file is not a SQLite database.

Root Cause

The database-list page accepts selected database names from the POST body and calls `drop_databases()`:

if ($_POST["db"] && !$error) {
    queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
}

In SQLite mode, `drop_databases()` attaches an in-memory database and unlinks each submitted path directly:

function drop_databases($databases) {
    connection()->attach(":memory:", '', '');
    foreach ($databases as $db) {
        if (!@unlink($db)) {
            connection()->error = lang('File exists.');
            return false;
        }
    }
    return true;
}

The same SQLite driver protects create and rename operations with `check_sqlite_name()`, which requires a `.db`, `.sdb`, or `.sqlite` extension:

function check_sqlite_name($name) {
    $extensions = "db|sdb|sqlite";
    if (!preg_match("~^[^\0]*\.($extensions)$~", $name)) {
        connection()->error = lang('Please use one of the extensions %s.', str_replace("|", ", ", $extensions));
        return false;
    }
    return true;
}

The drop path does not apply an equivalent extension check or bind the submitted path to a known listed SQLite database.

POC

1. Start a complete Adminer application

Build and start Adminer from the audited source using the official standalone Docker image shape. The validation image copies the audited source tree into `/var/www/html` and starts PHP's built-in web server as the official `adminer:standalone` image does.

Log in through the SQLite entry point using a SQLite database path.

<img width="1440" height="1000" alt="image" src="https://github.com/user-attachments/assets/2df3a429-031c-4309-a8f3-04fd7153b203" />

2. Prepare a writable target file

Place a non-database file under a location writable by the Adminer PHP process. The validation used:

adminer/workspace/poc-delete-target.txt

The same directory also contained a SQLite database:

adminer/workspace/poc.sqlite
3. Submit the database-list drop request

Use the authenticated session and live CSRF token, but submit the non-database path as the selected database:

POST /adminer/sqlite.php?sqlite=&username= HTTP/1.1
Host: <adminer-host>
Cookie: <authenticated-session>
Content-Type: application/x-www-form-urlencoded

db[]=workspace/poc-delete-target.txt&all=&drop=Drop&token=<live-csrf-token>

The request reaches `drop_databases($_POST["db"])`, and SQLite `drop_databases()` calls `unlink()` on the submitted non-database path.

After the request, the `poc-delete-target.txt` was deleted.

Suggested Fix

Apply the same target validation used by SQLite create/rename before deleting database files. At minimum:

  • Reject paths whose basename does not end in `.db`, `.sdb`, or `.sqlite`.
  • Bind `db[]` values to databases returned by Adminer's database listing instead of trusting submitted paths.
  • Resolve paths before deletion and reject traversal outside the expected SQLite database directory.
  • Consider requiring the current selected database path for delete operations instead of accepting arbitrary submitted file paths.

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:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
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
vrana/adminer< 5.4.3
5.4.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistvrana/adminer
Corregida 5.4.3 — —
Versiones corregidas5.4.3
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/vrana/adminer/security/advisories/GHSA-6pg3-chwq-wgqc

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