Vulnerability record · CVE-2018-12613 · published 21 June 2018
CVE-2018-12613: phpMyAdmin 4.8.x improper whitelist check allows local file inclusion and code execution
Phpmyadmin · Phpmyadmin
phpMyAdmin 4.8.x before 4.8.2 fails to properly validate which pages may be loaded during internal redirects, letting an attacker include and potentially execute files on the server. The flaw is reachable by an authenticated user, and in specific configurations (AllowArbitraryServer=true or ServerDefault=0) it can be triggered without valid credentials.
Description
An issue was discovered in phpMyAdmin 4.8.x before 4.8.2, in which an attacker can include (view and potentially execute) files on the server. The vulnerability comes from a portion of code where pages are redirected and loaded within phpMyAdmin, and an improper test for whitelisted pages. An attacker must be authenticated, except in the "$cfg['AllowArbitraryServer'] = true" case (where an attacker can specify any host he/she is already in control of, and execute arbitrary code on phpMyAdmin) and the "$cfg['ServerDefault'] = 0" case (which bypasses the login requirement and runs the vulnerable code without any authentication).
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityHigh CVSS (8.8), very high EPSS, public exploit code, and a configuration path that bypasses authentication make this an urgent patch target.
What it is
phpMyAdmin 4.8.x before 4.8.2 fails to properly validate which pages may be loaded during internal redirects, letting an attacker include and potentially execute files on the server. The flaw is reachable by an authenticated user, and in specific configurations (AllowArbitraryServer=true or ServerDefault=0) it can be triggered without valid credentials.
Impact
An attacker can read files on the server and, depending on available files and configuration, execute arbitrary code on the phpMyAdmin host. This yields compromise of the database management interface and potentially the underlying web server.
Attack surface
Reached over the network via HTTP requests to the phpMyAdmin web interface; the CVSS vector indicates low privileges are required, but the description notes that ServerDefault=0 bypasses authentication entirely and AllowArbitraryServer=true allows an attacker-controlled host to be specified. No user interaction is required.
Exploitation
Public exploit code exists (Exploit-DB 44924, 44928, 45020 and a Packet Storm RCE writeup), and EPSS is very high at 0.9835 (99.9th percentile), though the CVE is not listed in CISA KEV.
What to do
- Upgrade phpMyAdmin to 4.8.2 or later immediately.
- If upgrade is not possible, restrict network access to phpMyAdmin to trusted administrative networks only.
- Set $cfg['AllowArbitraryServer'] = false and avoid $cfg['ServerDefault'] = 0 to remove the unauthenticated and arbitrary-host paths.
- Enforce strong authentication and least privilege on phpMyAdmin accounts, and remove unused accounts.
- Monitor and restrict the web server user's ability to read sensitive files and execute code.
Detection
- Inspect web server and phpMyAdmin logs for requests to index.php with unusual 'target' parameters or path traversal sequences.
- Alert on POST/GET requests to phpMyAdmin endpoints containing file paths or '..' patterns.
- Monitor for unexpected file reads or process execution by the web server user following phpMyAdmin requests.
- Hunt for known exploit payload patterns from public Exploit-DB entries against phpMyAdmin 4.8.x.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2018-12613 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2018-12613), CISA KEV, FIRST EPSS (scores of 2026-09-17). This page is refreshed as NVD updates the record.