Bringing MySQL to the web


Announcement-ID: PMASA-2013-8

Date: 2013-07-28

Updated: 2013-07-30


XSS due to unescaped HTML Output when executing a SQL query.


Using a crafted SQL query, it was possible to produce an XSS on the SQL query form.


We consider these vulnerabilities to be non critical.

Mitigation factor

This vulnerability can be triggered only by someone who logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users from accessing the required form.

Affected Versions

Versions 3.5.x (prior to and 4.0.x (prior to are affected.


Upgrade to phpMyAdmin or or newer or apply the patches listed below.


Thanks to Michał Bentkowski for reporting this issue.

Assigned CVE ids: CVE-2013-4995

CWE ids: CWE-661 CWE-79


The following commits have been made to fix this issue:

The following commits have been made on the 3.5 branch to fix this issue:

More information

For further information and in case of questions, please contact the phpMyAdmin team. Our website is