All vulnerabilities

Servers and applications

GHSA-75xm-qwfq-9wp5

Arbitrary .sql file write via unvalidated ns in sql-log plugin

Severity
Medium 5.4
Published
9 Jul 2026
Last changed
9 Jul 2026
Added to UpHeron
3 Nov 2026
Fixed in
5.4.3
Weakness
Path traversal (CWE-22)CWE-73
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Change some data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Sources
Project advisories (GitHub)

Description

The bundled sql-log plugin builds its log file path from the request parameter $_GET["ns"] without sanitization (plugins/sql-log.php:29), then opens that path for appending (plugins/sql-log.php:31) and writes each executed query verbatim (plugins/sql-log.php:33). The ns parameter is the PostgreSQL schema selector and is normally validated by set_schema(), but that validation is gated on a database being selected. When the user is logged in with no database selected, database() returns an empty string, ns is never checked, and the concatenation "" . ".$_GET[ns]" . ".sql" places the entire path under attacker control.

An authenticated user submits any SQL query with a traversal sequence in ns. The plugin writes an attacker-named .sql file, containing attacker-controlled content, to any directory writable by the Adminer process.

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

Affected software

SoftwareAffected versions
AdminerServers and applications · github:vrana/adminer
  • From 5.3.0 before 5.4.3

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