CVE-2023-25727: phpMyAdmin - XSS Vulnerability

phpmyadmin Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2023-25727: In phpMyAdmin before 4.9.11 and 5.x before 5.2.1, an authenticated user can trigger XSS by uploading a crafted .sql file through the drag-and-drop interface. Affects phpmyadmin across 2 version ranges.

< 4.9.11 >= 5.0.0, < 5.2.1

Fixed in 4.9.11 or 5.2.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2023-25727 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

phpMyAdmin is a popular open-source tool for managing MySQL databases. It provides a web-based interface that allows users to perform various database management tasks. This vulnerability affects phpMyAdmin versions before 4.9.11 and 5.x before 5.2.1. The vulnerability allows an authenticated user to trigger a cross-site scripting (XSS) attack by uploading a specially crafted .sql file through the drag-and-drop interface.

Vulnerability Detail

The vulnerability arises due to insufficient input sanitization when processing the uploaded .sql file. An attacker with authenticated access can upload a malicious .sql file containing JavaScript code. When another user, such as an administrator, views the uploaded file, the JavaScript code will be executed in their browser context. This can lead to various consequences, including session hijacking, data theft, or the injection of malicious content into the application.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.9.11 4.9.11
  • >= 5.0.0, < 5.2.1 5.2.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the drag-and-drop interface in phpMyAdmin. This can be done by modifying the configuration file and setting the 'UploadDir' option to an empty value. However, it is strongly advised to upgrade to the patched version as soon as possible.

Conclusion

In conclusion, phpMyAdmin versions before 4.9.11 and 5.x before 5.2.1 are vulnerable to an XSS attack through the drag-and-drop interface. Upgrading to the latest version or applying the temporary workaround is crucial to mitigate the risk of exploitation. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for phpmyadmin →

Share this vulnerability

FAQ

phpMyAdmin is an open-source tool for managing MySQL databases through a web-based interface. It provides a convenient way to perform various database administration tasks.

Versions of phpMyAdmin before 4.9.11 and 5.x before 5.2.1 are vulnerable to this XSS attack.

An attacker with authenticated access can upload a specially crafted .sql file through the drag-and-drop interface. When another user views the uploaded file, the attacker's JavaScript code will be executed in their browser context.

The XSS vulnerability can lead to session hijacking, data theft, or the injection of malicious content into the application.

Yes, a temporary workaround is to disable the drag-and-drop interface in phpMyAdmin by modifying the configuration file. However, upgrading to the patched version is strongly recommended.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.9.11 4.9.11
  • >= 5.0.0, < 5.2.1 5.2.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback