Cross-Site Scripting (XSS) Vulnerability in phpMyAdmin

phpmyadmin Updated 02 Oct 2025

Summary

03/07/2016
N/A
Yes i
Medium
6.1

CVE-2016-5731: Cross-site scripting (XSS) vulnerability in examples/openid.php in phpMyAdmin 4.0.x before 4.0.10.16, 4.4.x before 4.4.15.7, and 4.6.x before 4.6.3 allows remote attackers to inject arbitrary web script or HTML via vecto... Affects phpmyadmin across 3 version ranges.

< 4:4.6.3-1 < 94cf3864254ffaf3a69e97d8fc454888368b94ab < 418aeea3d83b0b6021bac311d849570acfc6e48c

Fixed in 4:4.6.3-1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

phpMyAdmin is a popular open-source tool for managing MySQL databases through a web interface. It provides users with a convenient way to perform various database operations, such as creating tables, executing queries, and managing user permissions. However, a vulnerability has been discovered in phpMyAdmin that allows remote attackers to inject arbitrary web script or HTML through a cross-site scripting (XSS) attack.

Vulnerability Detail

The vulnerability, identified as CVE-2016-5731, exists in the 'openid.php' file within phpMyAdmin versions 4.0.x before 4.0.10.16, 4.4.x before 4.4.15.7, and 4.6.x before 4.6.3. It can be exploited by manipulating OpenID error messages to inject malicious code or HTML into the application. This can lead to various security risks, including session hijacking, data theft, and unauthorized access to sensitive information.

How To Fix

Minimum fixed version

4:4.6.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade phpmyadmin

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the affected functionality or implement input validation and output encoding to prevent the execution of malicious scripts. Here's an example of input validation using PHP:

$input = $_GET['input'];

// Validate and sanitize the input
if (preg_match('/^[a-zA-Z0-9]+$/', $input)) {
    // Process the input
    ...
} else {
    // Handle invalid input
    ...
}

Note that this is just a basic example, and the actual implementation may vary depending on the application's context and requirements.

Conclusion

The XSS vulnerability in phpMyAdmin (CVE-2016-5731) poses a security risk to systems running affected versions. It is crucial to upgrade to the latest version or apply the recommended workarounds to mitigate the vulnerability. For further assistance or support in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for phpmyadmin →

Share this vulnerability

FAQ

phpMyAdmin is an open-source tool that provides a web-based interface for managing MySQL databases. It allows users to perform various database operations, such as creating tables, executing queries, and managing user permissions.

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts or HTML into web pages viewed by other users. This can lead to various attacks, such as session hijacking, data theft, and defacement of websites.

The XSS vulnerability in phpMyAdmin can be exploited by manipulating OpenID error messages. Attackers can inject malicious scripts or HTML into the error messages, which are then executed when viewed by other users.

The XSS vulnerability in phpMyAdmin can lead to session hijacking, where an attacker can impersonate a legitimate user and perform actions on their behalf. It can also result in data theft, where sensitive information stored in the database can be accessed and exfiltrated by the attacker.

To protect your phpMyAdmin installation, it is recommended to upgrade to the latest version (4.6.3 or later) that includes patches for the XSS vulnerability. Additionally, you should follow secure coding practices, such as input validation and output encoding, to prevent the execution of malicious scripts.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

4:4.6.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade phpmyadmin

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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