Skip to content
GHSA 2gwx 67mg Hfr3

GHSA 2gwx 67mg Hfr3

github.com • November 17, 2026

AdminNeo through 5.9.0 contains a remote code execution vulnerability that allows authenticated SQLite driver users to bypass the check_sqlite_name() extension check using a PDO_SQLite file: URI. Attackers can submit a create-database name like file:.php?x=.db to create a PHP file in a web-served directory, write table data into it, and execute code as the web server user.

Found by AlpetGexha and reported to us (VulnCheck CNA); we verified it against main ( a4fe19b , identical to v5.9.0 plus a version bump) and reproduced it end to end.

check_sqlite_name() is the guard that keeps the SQLite driver from creating files with a PHP extension ( admin/drivers/sqlite.inc.php#L600-L609 ). It only requires the name to end in .db , .sdb or .sqlite :

PDO_SQLite treats a filename that starts with file: as an SQLite URI, and everything after ? is a query string. file:/var/www/x.php?a=.db therefore passes the check, but SQLite opens and creates /var/www/x.php .

create_database() ( sqlite.inc.php#L611-L627 ) passes the checked name to SqLiteConnection::open() . The PDO branch ( #L115-L117 ) opens DRIVER . ":$server" , i.e. sqlite:file:... . Any request selects the PDO branch with ext=pdo ( #L15 : class_exists("SQLite3") && $_GET["ext"] != "pdo" ), and servers without the SQLite3 class use it anyway. The SQLite3 extension does not interpret file: here; it creates a file literally named file:... .

The created file can then be selected as the current database by its plain path, since selectDatabase() does not re-check the extension, so table data written through the SQL command page lands in the .php file.

A user logged in to the SQLite driver (which needs the configured defaultPasswordHash or a login plugin) posts the create-database form with name=file: .php?x=.db . Same boundary as GHSA-ggh8-3chg-48w7 / GHSA-66c7-5wxm-rfgj / GHSA-q5vv-mh5m-fxvm / GHSA-q5mp-gfjf-cf2j : SQLite access must not become code execution as the web server user. rename_database() and drop_databases() use the same check but rename() / unlink() do not interpret URIs.

The check and the PDO branch are unchanged on main; we did not bisect further back. Reported as /admin/poc-shell.php ) and run on the SQL command page:

The PHP in the stored row ran as the web server user (uid 501 here).

A user who can log in to the SQLite driver can create a file with any extension in any directory the PHP process can write, and fill it with content through ordinary table data. Where that directory is served and executes PHP, this is code execution as the web server user, the outcome the extension check exists to prevent. Preconditions: SQLite driver login, pdo_sqlite loaded (the PHP default), a writable web-served directory.

adminneo/admin/drivers/sqlite.inc.php Lines 600 to 627 in a4fe19b function check_sqlite_name ( string $ name ): bool { // avoid creating PHP files on unsecured servers $ extensions = " db|sdb|sqlite " ; if (! preg_match ( " ~^[^ \\ 0]* \\ .( $ extensions ) \$ ~ " , $ name )) { Connection :: get ()-> setError ( lang ( ' Please use one of the extensions %s. ' , str_replace ( " | " , " , " , $ extensions ))); return false ; } return true ; } function create_database ( string $ db , ? string $ collation ): bool { if ( file_exists ( $ db )) { Connection :: get ()-> setError ( lang ( ' File exists. ' )); return false ; } if (! check_sqlite_name ( $ db )) { return false ; } try { $ link = SqLiteConnection :: createSecondary (); $ link -> open ( $ db , "" , "" ); } catch ( Exception $ ex ) { Connection :: get ()-> setError ( $ ex -> getMessage ()); return false ; } $ link -> query ( ' PRAGMA encoding = "UTF-8" ' );

adminneo/admin/drivers/sqlite.inc.php

Lines 600 to 627 in a4fe19b

Reported by: AlpetGexha

Extracted Entities

Attack Types (1)

CWE Weaknesses (1)

Platforms (2)