CVE-2016-2040: phpMyAdmin XSS Vulnerability

phpmyadmin/phpmyadmin Updated 02 Oct 2025

Summary

14/05/2022
Yes i
Moderate
5.4

CVE-2016-2040: phpMyAdmin XSS Vulnerability. Affects phpmyadmin/phpmyadmin across 3 version ranges.

>= 4.0, < 4.0.10.13 >= 4.4, < 4.4.15.3 >= 4.5, < 4.5.4

Fixed in 4.0.10.13, 4.4.15.3 or 4.5.4, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2016-2040 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

phpMyAdmin is a popular open-source administration tool for managing MySQL databases. It provides a web-based interface that allows users to perform various database management tasks such as creating, modifying, and deleting databases, tables, and queries. The vulnerability identified as CVE-2016-2040 is an XSS (Cross-Site Scripting) vulnerability that affects phpMyAdmin versions 4.0.x, 4.4.x, and 4.5.x. This vulnerability allows remote authenticated users to inject arbitrary web script or HTML into certain fields, potentially leading to the execution of malicious code or unauthorized access to sensitive information.

Vulnerability Detail

The XSS vulnerability in phpMyAdmin arises from improper input sanitization in several components. Specifically, the vulnerability can be exploited through the following fields: table name, SET value, search query, and hostname in a Location header. By injecting specially crafted scripts or HTML code into these fields, an attacker can manipulate the behavior of the affected web application and potentially compromise the security of the system. This vulnerability has a CVSS score of 5.4, indicating a moderate level of severity.

How To Fix

Fixed versions by release line

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

  • >= 4.0, < 4.0.10.13 4.0.10.13
    composer require phpmyadmin/phpmyadmin:4.0.10.13
  • >= 4.4, < 4.4.15.3 4.4.15.3
    composer require phpmyadmin/phpmyadmin:4.4.15.3
  • >= 4.5, < 4.5.4 4.5.4
    composer require phpmyadmin/phpmyadmin:4.5.4

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 can be implemented by applying input validation and sanitization measures to the affected fields. This can be achieved by implementing server-side input validation routines and using appropriate encoding techniques to neutralize any potential malicious input. However, it is important to note that workarounds may not provide complete protection and should only be considered as a temporary solution until the software can be updated.

Conclusion

The phpMyAdmin XSS vulnerability (CVE-2016-2040) poses a moderate level of risk to systems running affected versions of phpMyAdmin. It is crucial to promptly update to the latest version or apply temporary workarounds to mitigate the risk of exploitation. For further assistance and support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for phpmyadmin/phpmyadmin →

Share this vulnerability

FAQ

phpMyAdmin is an open-source administration tool for managing MySQL databases. It provides a web-based interface for performing various database management tasks.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts or HTML code into web pages viewed by other users. This can lead to the execution of arbitrary code or unauthorized access to sensitive information.

The vulnerability can be exploited by injecting specially crafted scripts or HTML code into certain fields in phpMyAdmin, such as table name, SET value, search query, or hostname in a Location header.

The vulnerability has a CVSS score of 5.4, indicating a moderate level of severity.

To fix this vulnerability, it is recommended to upgrade phpMyAdmin to the latest version (4.0.10.13, 4.4.15.3, or 4.5.4). Alternatively, you can implement temporary workarounds by applying input validation and sanitization measures to the affected fields.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin/phpmyadmin.

How To Fix

Fixed versions by release line

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

  • >= 4.0, < 4.0.10.13 4.0.10.13
    composer require phpmyadmin/phpmyadmin:4.0.10.13
  • >= 4.4, < 4.4.15.3 4.4.15.3
    composer require phpmyadmin/phpmyadmin:4.4.15.3
  • >= 4.5, < 4.5.4 4.5.4
    composer require phpmyadmin/phpmyadmin:4.5.4

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