CVE-2018-12613

HIGH EXPLOITED IN THE WILD NUCLEI

phpMyAdmin 4.8.x <4.8.2 - Code Injection

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2018-12613 has been observed exploited in the wild (reported by VulnCheck KEV, InTheWild.io). EIP tracks 9 public exploits from researchers including samguy, Metasploit, VulnSpy, including a Metasploit module exploits/multi/http/phpmyadmin_lfi_rce. A Nuclei detection template is also available.

AI-analyzed exploit summary This exploit targets a vulnerability in phpMyAdmin 4.8.0 and 4.8.1, allowing remote code execution by leveraging a session file inclusion flaw. It authenticates, injects a malicious query, and triggers execution via a crafted URL.

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).

Exploits (9)

exploitdb WORKING POC VERIFIED
by samguy · pythonwebappsphp
https://www.exploit-db.com/exploits/50457

This exploit targets a vulnerability in phpMyAdmin 4.8.0 and 4.8.1, allowing remote code execution by leveraging a session file inclusion flaw. It authenticates, injects a malicious query, and triggers execution via a crafted URL.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin 4.8.0, 4.8.1
Auth required
Prerequisites: Valid credentials for phpMyAdmin · Target running phpMyAdmin 4.8.0 or 4.8.1
devstral-2 · analyzed Feb 16, 2026 Full analysis →
exploitdb WORKING POC VERIFIED
by Metasploit · rubyremotephp
https://www.exploit-db.com/exploits/45020

This Metasploit module exploits CVE-2018-12613, an authenticated local file inclusion vulnerability in phpMyAdmin 4.8.0 and 4.8.1, leading to remote code execution via crafted database queries and session file inclusion.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin v4.8.0, v4.8.1
Auth required
Prerequisites: Valid credentials for phpMyAdmin · Access to the phpMyAdmin interface
devstral-2 · analyzed Feb 16, 2026 Full analysis →
exploitdb WORKING POC VERIFIED
by VulnSpy · textwebappsphp
https://www.exploit-db.com/exploits/44928

This exploit leverages a Local File Inclusion (LFI) vulnerability in phpMyAdmin 4.8.0/4.8.1 to achieve Remote Code Execution (RCE) by including a session file containing malicious PHP code. The attacker first injects PHP code via an SQL query, then includes the session file through a crafted URL.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin 4.8.0, 4.8.1
Auth required
Prerequisites: Valid session file path · Ability to execute SQL queries in phpMyAdmin
devstral-2 · analyzed Feb 16, 2026 Full analysis →
exploitdb WORKING POC VERIFIED
by ChaMd5 · textwebappsphp
https://www.exploit-db.com/exploits/44924

This exploit leverages a Local File Inclusion (LFI) vulnerability in phpMyAdmin 4.8.1 via a double URL-encoded payload to bypass input validation. It demonstrates reading arbitrary files and suggests a method to achieve remote code execution by including a database file containing malicious PHP code.

Classification
Working Poc 90%
Attack Type
Lfi | Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin 4.8.1
No auth needed
Prerequisites: Access to the target phpMyAdmin instance · Knowledge of the path to the database files
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 10 stars
by 0x00-0x00 · remote-auth
https://github.com/0x00-0x00/CVE-2018-12613

This PowerShell script exploits a Local File Inclusion (LFI) vulnerability in PHPMyAdmin v4.8.0 and v4.8.1 by leveraging a filter bypass using the %253f character. It crafts an HTTP request with authenticated cookies to retrieve arbitrary files from the remote server.

Classification
Working Poc 95%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: PHPMyAdmin v4.8.0, v4.8.1
Auth required
Prerequisites: Authenticated session cookies for PHPMyAdmin · Target URL of vulnerable PHPMyAdmin instance · Path of the file to be retrieved
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by ivanitlearning · remote-auth
https://github.com/ivanitlearning/CVE-2018-12613

This is a Python 3 port of the CVE-2018-12613 exploit for phpMyAdmin 4.8.0/4.8.1, which allows arbitrary file read and PHP code execution via path traversal and SQL injection. The PoC includes authentication checks and version validation.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin 4.8.0, 4.8.1
Auth required
Prerequisites: Valid phpMyAdmin credentials · Target running vulnerable phpMyAdmin version (4.8.0 or 4.8.1) · Linux-based target system
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP 2 stars
by eastmountyxz · poc
https://github.com/eastmountyxz/CVE-2018-12613-phpMyAdmin

This repository contains a writeup in Chinese discussing a file inclusion vulnerability in phpMyAdmin 4.8.1 (CVE-2018-12613). It describes the vulnerability's configuration, principles, and reproduction steps but does not include exploit code.

Classification
Writeup 90%
Attack Type
Other
Complexity
Moderate
Reliability
Theoretical
Target: phpMyAdmin 4.8.1
No auth needed
Prerequisites: phpMyAdmin 4.8.1 installation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
vulncheck_xdb WORKING POC
remote-auth
https://github.com/filippo-zullo98/phpMyAdmin-RCE-Exploit-Lab

This repository contains a functional exploit for CVE-2018-12613, targeting phpMyAdmin 4.8.1 with a Python-based RCE exploit and a reverse shell generator. It also includes a privilege escalation exploit for CVE-2023-2640 and detailed documentation.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin 4.8.1
Auth required
Prerequisites: phpMyAdmin 4.8.0/4.8.1 · PHP < 7.3 · valid credentials or misconfigured auth
devstral-2 · analyzed Feb 25, 2026 Full analysis →
metasploit WORKING POC GOOD
by ChaMd5, Henry Huang, Jacob Robles · rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmyadmin_lfi_rce.rb

This Metasploit module exploits an authenticated local file inclusion (LFI) vulnerability in phpMyAdmin 4.8.0 and 4.8.1 to achieve remote code execution (RCE) by creating a malicious database table and including it via path traversal.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: phpMyAdmin v4.8.0, v4.8.1
Auth required
Prerequisites: Valid credentials for phpMyAdmin · Target running phpMyAdmin 4.8.0 or 4.8.1
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

PhpMyAdmin <4.8.2 - Local File Inclusion
HIGHby pikpikcu
Shodan: http.title:"phpmyadmin" || http.component:"phpmyadmin" || cpe:"cpe:2.3:a:phpmyadmin:phpmyadmin"
FOFA: title="phpmyadmin" || body="pma_servername" && body="4.8.4"

References (7)

Core 7
Core References
Vendor Advisory x_refsource_confirm
https://www.phpmyadmin.net/security/PMASA-2018-4/
Exploit, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/45020/
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/104532
Exploit, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/44924/
Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/44928/
Third Party Advisory vendor-advisory x_refsource_gentoo
https://security.gentoo.org/glsa/201904-16
Exploit, Third Party Advisory, VDB Entry x_refsource_misc
http://packetstormsecurity.com/files/164623/phpMyAdmin-4.8.1-Remote-Code-Execution.html

Scores

CVSS v3 8.8
EPSS 0.9426
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

VulnCheck KEV 2022-12-06
InTheWild.io 2022-12-07
CWE
CWE-287
Status published
Products (2)
phpmyadmin/phpmyadmin 4.8 - 4.8.2Packagist
phpmyadmin/phpmyadmin 4.8.0 - 4.8.2
Published Jun 21, 2018
Tracked Since Feb 18, 2026