All vulnerabilities

Servers and applications

GHSA-5xfm-7vgj-3f39

SQLite: check_sqlite_name() accepts a file: URI, enabling arbitrary file creation and RCE

Severity
Medium 6.8
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
20 Nov 2026
Fixed in
6.3.1
Weakness
CWE-73
Attack
Over the network · Only under certain conditions · Needs a user account · No user action needed
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Sources
Project advisories (GitHub)

Description

Adminer's SQLite driver validates a database name with a suffix regex and then passes the same string to PDO_SQLite, which parses it as a file: URI. A name such as file:/var/www/html/shell.php?mode=rwc&x=.db passes the check but creates /var/www/html/shell.php. A normal CREATE TABLE then writes PHP code into that file, giving command execution as the web server user. Reproduced end-to-end on 6.3.0.

check_sqlite_name() decides whether a database name is acceptable with a suffix regex:

create_database() then passes the same string to the connection layer:

With the PDO_SQLite backend that becomes new PDO("sqlite:" . $k). PDO_SQLite opens the connection with SQLITE_OPEN_URI, so a value beginning with file: is parsed as a URI: the database file is the part before ?, and the rest is interpreted as URI parameters. Unknown parameters are ignored.

So file:/var/www/html/shell.php?mode=rwc&x=.db satisfies check_sqlite_name() (it ends in .db) while SQLite creates /var/www/html/shell.php.

From vrana/adminer's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
AdminerServers and applications · github:vrana/adminer
  • Every version before 6.3.1

About Adminer

tool for managing content in MySQL databases

From Wikidata, CC0 1.0.
Docker Hub pulls
411,345,578Docker Hub, 15 Nov 2026
GitHub stars
7,954GitHub, 15 Nov 2026
Forks
1,181GitHub, 15 Nov 2026
Latest release
v6.3.0GitHub, 15 Nov 2026
Released
3 Nov 2026GitHub
Developer
Jakub VránaWikidata
License
Apache LicenseWikidata
Written in
PHPWikidata
First released
11 Jul 2007Wikidata
First published on GitHub
25 Apr 2010GitHub

References