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).
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | phpMyAdmin | 5.1.1-1.2 | openSUSE-SU-2024:11171-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.23 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.22 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.21 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.20 | phpmyadmin | 4.8.2-r0 | — |
Show 12 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.18 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.17 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.16 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.15 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.14 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.13 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.12 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.11 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.10 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.9 | phpmyadmin | 4.8.2-r0 | — |
| Alpine v3.8 | phpmyadmin | 4.8.2-r0 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
phpMyAdmin Authenticated Remote Code Execution
exploit/multi/http/phpmyadmin_lfi_rce
Exploit-DB 4
- phpMyAdmin 4.8.1 - Remote Code Execution (RCE) EDB-50457 · webapps · Oct 25, 2021 · verified
- phpMyAdmin - (Authenticated) Remote Code Execution (Metasploit) EDB-45020 · remote · Jul 13, 2018 · verified
- phpMyAdmin 4.8.1 - (Authenticated) Local File Inclusion (2) EDB-44928 · webapps · Jun 22, 2018 · verified
- phpMyAdmin 4.8.1 - (Authenticated) Local File Inclusion (1) EDB-44924 · webapps · Jun 21, 2018 · verified
GitHub 4 repositories
-
0x00-0x00/CVE-2018-12613 ★ 10 · Nov 9, 2018
PHPMyAdmin v4.8.0 and v.4.8.1 LFI exploit
-
ivanitlearning/CVE-2018-12613 ★ 4 · Sep 16, 2019
Modified standalone exploit ported for Python 3
-
eastmountyxz/CVE-2018-12613-phpMyAdmin ★ 2 · Feb 19, 2020
这篇文章将分享一个phpMyAdmin 4.8.1版本的文件包含漏洞,从配置到原理,再到漏洞复现进行讲解,更重要的是让大家了解这些真实漏洞背后的知识。基础性文章,希望对您有所帮助!
-
CyberCTF/vulhub-phpmyadmin-cve-2018-12613 ★ 0 · Oct 8, 2026
Vulhub phpmyadmin/CVE-2018-12613: phpMyAdmin 4.8.1 local file inclusion, run with Isoloom
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- PhpMyAdmin <4.8.2 - Local File Inclusion http/cves/2018/CVE-2018-12613.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | phpmyadmin/phpmyadmin | >= 4.8, < 4.8.2 | 4.8.2 | GHSA-x394-g9j8-x7mf |
Advisories 1
- openSUSE-SU-2024:11171-1 phpMyAdmin-5.1.1-1.2 on GA media SUSE / openSUSE Security Updates · May 7, 2025
References
- https://www.phpmyadmin.net/security/PMASA-2018-4/
- 45020 exploit
- 104532 vdb-entry
- 44924 exploit
- 44928 exploit
- GLSA-201904-16 vendor-advisory
- http://packetstormsecurity.com/files/164623/phpMyAdmin-4.8.1-Remote-Code-Execution.html