Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2018-12613: File inclusion in phpMyAdmin before 4.8.2

Published Jun 21, 2018 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS98.4%100th percentile
CISA KEVNoNot listed
In the wildReported3 exploitation records in Mallory
Vendor
Phpmyadmin
IdentifiersCVE-2018-12613CWE-98

CVE-2018-12613 is a file-inclusion vulnerability in phpMyAdmin 4.8.x before 4.8.2. Improper validation of whitelisted pages in the page-redirection and loading logic allows attackers to include server-side files, potentially exposing their contents or executing code. Exploitation normally requires authentication, but configurations enabling AllowArbitraryServer or setting ServerDefault to 0 provide exceptions to that requirement.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can disclose server-side file contents and potentially execute included files. With AllowArbitraryServer enabled, an attacker controlling a host that can be selected as the database server can execute arbitrary code on the phpMyAdmin server. Earlier Zerobot variants and Wszero used this vulnerability as a propagation vector; Zerobot 1.1 removed the exploit.

Mitigation

If you can’t patch tonight, do this now.

As interim risk reduction, disable AllowArbitraryServer and avoid setting ServerDefault to 0 to eliminate the identified authentication exceptions. These configuration changes do not fix the underlying file-inclusion vulnerability or prevent exploitation by authenticated attackers.

Remediation

Patch, then assume compromise.

Upgrade affected phpMyAdmin 4.8.x installations to version 4.8.2 or a later supported release.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 3 not yet analyzed, such as Exploit-DB entries.

View more in app →
phpmyadmin_lfi_rce.rbThis repository contains a single Metasploit module (modules/exploits/multi/http/phpmyadmin_lfi_rce.rb) that exploits an authenticated local file inclusion (LFI) vulnerability (CVE-2018-12613) in phpMyAdmin versions 4.8.0 and 4.8.1. The exploit requires valid phpMyAdmin credentials and targets the web interface, typically at /phpmyadmin/. The module authenticates to phpMyAdmin, creates a database and table with a malicious PHP payload, determines the data directory, and then uses a crafted LFI request to include a session or table file containing the payload, resulting in remote code execution as the web server user. The exploit is operational and provides the attacker with the ability to execute arbitrary PHP code on the target server. The code is written in Ruby and is designed to be used within the Metasploit framework.Disclosed Jun 19, 2018 · Framework: metasploit · ruby · networkWeaponizedCVE-2018-12613This repository contains a Python 3 exploit script (CVE-2018-12613.py) targeting phpMyAdmin versions 4.8.0 and 4.8.1 on Linux systems. The exploit leverages a local file inclusion vulnerability to execute arbitrary PHP code on the target server. The script authenticates to phpMyAdmin using supplied credentials, verifies the version is vulnerable, and then performs directory traversal to confirm the server is Linux-based. It then injects a user-supplied PHP payload (such as a reverse shell) via a crafted SQL query and retrieves the output from the server's PHP session files. The result of the payload execution is saved locally as 'result.html'. The README provides usage instructions and demonstrates how to use a msfvenom-generated PHP reverse shell payload. The main attack vector is network-based, exploiting the phpMyAdmin web interface via HTTP requests. The repository is structured with a single exploit script and a README, and is operational, requiring only valid credentials and a vulnerable target to achieve code execution.ivanitlearning · Disclosed Sep 16, 2019 · python · networkOperationalCerberusThis repository is a Python-based web vulnerability scanner named Cerberus. It is designed to automate the detection of a wide range of web application vulnerabilities, including SQL injection, XSS, command injection, file inclusion, and SSRF. The tool supports both single-target and batch scanning (via file input or subdomain enumeration), and can also collect and use proxy IPs to bypass WAFs or IP bans. It features middleware fingerprinting and targeted exploitation for specific platforms (ThinkPHP, phpMyAdmin, Tomcat, Weblogic, Wordpress, Dedecms), with hardcoded exploits for known CVEs (e.g., CVE-2018-5955, CVE-2018-12613, CVE-2018-11759). The scanner can detect WAFs and attempt known bypasses, and it generates scan reports. The main entry point is 'cerberus.py', which orchestrates scanning based on command-line arguments. The codebase is modular, with core logic for payload management, proxy handling, subdomain brute-forcing, and vulnerability exploitation. Numerous endpoints are fingerprinted, including public proxy sources, file paths for LFI/RFI, and SSRF targets. The repository is operational and suitable for real-world vulnerability assessment of web applications.YagamiiLight · Disclosed Dec 21, 2019 · python · networkOperationalphpMyAdmin-CVE-2018-12613This repository is a small standalone PoC/lab for CVE-2018-12613 in phpMyAdmin, demonstrating unauthenticated local file inclusion/path traversal leading to arbitrary file read. The repo contains 6 files: a Python exploit (poc.py), a Bash exploit (poc.sh), a docker-compose lab definition, two sample target files (flag.txt and secret.conf), and a detailed README. The main exploit capability is remote retrieval of arbitrary files from a vulnerable phpMyAdmin instance by sending crafted GET requests to index.php with traversal sequences in parameters such as target=db_structure.php&server=../../../... . The Python PoC is the most complete implementation: it checks service availability, tries multiple endpoint/parameter combinations, and prints retrieved content from test files. The Bash PoC performs the same attack flow with curl. The docker-compose file builds a reproducible environment with MySQL 5.7 and phpMyAdmin exposed on localhost:8080, and mounts /var/www/html/flag.txt and /var/www/html/secret.conf into the container so the LFI can demonstrate disclosure. No code execution or shell payload is present; the exploit is focused on file disclosure only. Overall, this is a valid operational PoC for a web/network attack against vulnerable phpMyAdmin deployments.hs2131019 · Disclosed Jul 8, 2026 · python · bash · web · networkOperationalCVE-2018-12613This repository contains a PowerShell proof-of-concept exploit for CVE-2018-12613, a local file inclusion (LFI) vulnerability in PHPMyAdmin versions 4.8.0 and 4.8.1. The main script, PHPMyAdmin-LFI.ps1, takes three parameters: the target PHPMyAdmin URL, authenticated session cookies, and the path to a file to retrieve from the server. It constructs a specially crafted HTTP request that exploits the LFI vulnerability to read arbitrary files, such as /etc/passwd, from the remote server. The README provides usage instructions and notes that, while the script does not directly provide remote code execution, such an outcome is possible if the attacker can include a file containing PHP code (e.g., a session file). The repository is structured simply, with the main exploit script, a README, a license, and a .gitattributes file. The exploit requires authenticated access to the target PHPMyAdmin instance.0x00-0x00 · Disclosed Nov 9, 2018 · powershell · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PhpmyadminPhpmyadminapplication
FAQ

Frequently asked questions

Is CVE-2018-12613 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2018-12613?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2018-12613, the earliest disclosed Jun 19, 2018.
Is there a patch for CVE-2018-12613?
Upgrade affected phpMyAdmin 4.8.x installations to version 4.8.2 or a later supported release.
What products are affected by CVE-2018-12613?
Phpmyadmin.
How severe is CVE-2018-12613?
CVE-2018-12613 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 98.4% (100th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence2Every report linking this CVE to a named adversary.
Associated malware3Malware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.