The SQL Injection vulnerability in phpMyAdmin has been identified to be present in version 5.0.0 of the software, affecting the server privileges feature of the software, allowing an authenticated user the ability to inject any SQL needed to manipulate the database by modifying the parameters of the requests sent to the server.
This attack does utilize valid credentials for access to the database to utilize this vulnerability, but is still a major concern for shared or multiple users who access a database.
Vulnerability Details
1. Product: phpMyAdmin
2. Affected Version: 5.0.0
3. Vulnerability Type: SQL Injection
4. CVE ID: CVE20205504
5. Tested Platform: Windows
6. Submitted By: CodeSecLab
There is a vulnerability in the handling of user input for the server_privileges.php endpoint due to a lack of proper validation of input from a user to edit the intended SQL query.
The SQL Injection is authenticated through the following conditions:
1. Attacker is required have valid MySQL account
2. Attacker must have active phpMyAdmin session
3. Attack will occur through sending directly HTTP request from the attackers machine to the target system
When various users can access the same database, if the vulnerability is exploited, there is potential for rupture of privilege as well as exposure of sensitive material.
Proof of Concept
The following request demonstrates how SQL injection can be triggered by modifying the username parameter:
GET /server_privileges.php?ajax_request=true&validate_username=set&username=' OR '1'='1' -- HTTP/1.1
Host: phpmyadmin
Connection: close
When processed by the application, the injected payload alters the SQL logic, bypassing intended checks.
Steps for Demonstrating Vulnerability:
1. Log into the phpMyAdmin application with an active user account.
2. Intercept your requests while logged in via a web proxy (e.g. Burp Suite).
3. Send your modified request while maintaining your active session cookie.
4. You may see unexpected results from your request or altered behavior for the same request.
Why This Vulnerability Is So Important:
SQL injection is still considered one of the Top 10 most critical web application vulnerabilities, and it can be exploited by authenticated (verified) users. As an administrative tool, phpMyAdmin is a common target for malicious users, and its functions may allow exploits that result in unauthorized access/privilege escalation and unauthorized access to privileged functionality leading to data loss or compromise.
This vulnerability also serves as a reminder that even on internal or authenticated features, strict input validation is essential.
As a Conclusion: All users of supported versions of phpMyAdmin must upgrade or apply the vendor's recommendations for remediation to protect themselves from this attack. Developers must also ensure that all user-controlled input has been properly sanitized and parameterized when used in SQL queries. Never assume that users who you trust will provide valid input.
Source: Exploit DB
© 2016 - 2025 Red Secure Tech Ltd. Registered in England and Wales under Company Number: 15581067