All vulnerabilities

Servers and applications

GHSA-h6jr-7pr6-grgj

XSS via Rogue MySQL Server Version String (CSP Nonce Bypass)

Severity
Medium 6.1
Published
9 Jul 2026
Last changed
12 Aug 2026
Added to UpHeron
3 Nov 2026
Fixed in
5.4.3
Weakness
Cross-site scripting (CWE-79)Cross-site request forgery (CWE-352)
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Sources
Project advisories (GitHub)

Description

Adminer inserts the database server's version string into a tag that carries a valid CSP nonce, without any sanitization. A rogue database server can return a crafted version string that breaks out of the JavaScript context and executes arbitrary code. Because the script tag already has a valid nonce, the browser's Content Security Policy does not block execution. No authentication is required when combined with Login CSRF.

  • Target runs Adminer
  • Attacker controls a reachable MySQL server (a 80-line Python script)

adminer.inc.php, line 1081:

script() wraps the output in . The preg_replace regex expects a standard version like 5.7.38 and extracts the first two digits. When the version string does NOT start with digit + digit or dot, the regex fails to match and preg_replace` returns the original string unchanged.

Open a browser and navigate to http://localhost:8081/adminer.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 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