/

CVE-2026-56705

Severity:

CRITICAL RISK

(9.8)

File Name Control (CWE-73) in Adminer PDO Connector

CVE-2026-56705

Deferred

Vulnerability type

Category:

External Control of File Name or Path

CWE:

CWE-73

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical vulnerability in Adminer before 5.4.3 allows unauthenticated attackers to inject ODBC parameters into a PDO connection string through the server field. Under deployments where the resulting trace file is written inside the web root and later accessed, this may enable PHP code execution and remote compromise.

Affected context

The vulnerability occurs in Adminer deployments that accept attacker-influenced server connection data and incorporate it into a PDO DSN without adequately restricting driver-specific parameters. Risk is highest when ODBC tracing is available, trace output can be directed into a web-accessible directory, and the generated file is interpreted as PHP when requested.

Exploit preconditions

  • Attack surface: Adminer database connection handling and PDO DSN construction
  • Required access: Ability to reach the Adminer interface; authentication may not be required for the vulnerable input path
  • Trigger point: Processing of the server field while constructing the connection string
  • Why exploitation is possible: Semicolon-delimited ODBC parameters can influence trace behavior and file placement, potentially causing attacker-controlled content to be written into a web-accessible location

Why this happens

The underlying bug is insufficient validation and trust-boundary enforcement for a user-controlled server value used in a file-affecting connection configuration. Because the value is inserted into a PDO DSN without restricting unexpected ODBC parameters, an attacker may influence trace file names and tracing behavior. This maps to CWE-73: External Control of File Name or Path, where externally controlled input affects filesystem locations or file creation.

Potential impact

  • Attackers may write attacker-controlled content to a web-accessible file
  • PHP code execution may occur when the written file is processed by the web server
  • The Adminer host or connected application environment could be compromised
  • Database credentials and other server-side secrets may be exposed
  • The vulnerability could enable follow-on persistence or lateral movement

General mitigation guidance

Mitigation generally focuses on reducing trust in connection parameters and preventing user-controlled values from influencing filesystem behavior.

Common defensive patterns include:

  • Restricting server and driver parameters to an explicit allowlist
  • Avoiding direct concatenation of untrusted values into DSN strings
  • Disabling or tightly constraining database-driver tracing where it is unnecessary
  • Ensuring trace and temporary files are stored outside web-accessible directories
  • Preventing script execution in directories used for generated or diagnostic files
  • Running database administration tools with least privilege and limited filesystem access

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis of DSN construction and concatenation involving request parameters
  • Code review checks for semicolon-delimited driver options accepted from untrusted input
  • Runtime monitoring for unexpected ODBC trace settings or files created under web roots
  • Web-server and filesystem logs showing unusual requests for newly created PHP files
  • Policy enforcement that blocks script execution in upload, cache, trace, and temporary directories
  • Automated security review tools that flag external input reaching file paths or database driver options

Sources

SourceLink
github.comgithub.com/vrana/adminer/security/advisories/GHSA-r4x9-5m63-3vxw
vulncheck.comvulncheck.com/advisories/adminer-before-remote-code-execution-via-mssql-pdo-dsn-injection

Frequently asked

questions

Yes. The affected input is reachable through Adminer, and the vulnerability is described as unauthenticated. Successful impact still depends on the deployment allowing the injected connection behavior and exposing the resulting file to a PHP-capable web server.

The attacker generally needs network access to the Adminer interface and the ability to submit connection details. Database authentication is not necessarily required for the vulnerable input-processing path.

The safest pattern is to prevent untrusted input from controlling DSN options or filesystem paths, use strict allowlists for connection parameters, and keep generated diagnostic files outside executable web directories.

Validate connection fields against expected formats, separate configuration from user input, restrict driver features such as tracing, enforce non-executable storage locations, and monitor unexpected file creation in web-accessible paths.

Find out what's already
exploitable in your codebase.