CVE-2017-18264: phpMyAdmin Improper Privilege Management

phpmyadmin/phpmyadmin Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Critical
9.8

CVE-2017-18264: phpMyAdmin Improper Privilege Management. Affects phpmyadmin/phpmyadmin across 4 version ranges.

>= 4.0, < 4.0.10.20 >= 4.4.0, <= 4.4.15.10 >= 4.6.0, <= 4.6.6 >= 4.7.0-beta1, < 4.7.0

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

Also tracked for

The same CVE-2017-18264 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

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 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 in question affects phpMyAdmin versions 4.0 before 4.0.10.20, 4.4.x, 4.6.x, and 4.7.0 prereleases. This vulnerability relates to improper privilege management, which can lead to unauthorized access to the application by users who have no password set, even if the administrator has explicitly disallowed such access.

Vulnerability Detail

The vulnerability arises due to a bypass of the restrictions imposed by the configuration option $cfg['Servers'][$i]['AllowNoPassword'] = false. Under certain PHP versions (e.g., version 5), the restrictions can be circumvented, allowing users without a password to log in, even if the administrator has explicitly disabled this behavior. The issue stems from the fact that some implementations of the PHP substr function return false when given an empty string ('') as the first argument. This can be exploited to bypass the password check and gain unauthorized access to the phpMyAdmin application.

How To Fix

Fixed versions by release line

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

  • >= 4.0, < 4.0.10.20 4.0.10.20
    composer require phpmyadmin/phpmyadmin:4.0.10.20
  • >= 4.7.0-beta1, < 4.7.0 4.7.0
    composer require phpmyadmin/phpmyadmin:4.7.0

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 a fixed version is not immediately feasible, a temporary workaround can be implemented by modifying the affected code. Specifically, the substr function call in the libraries/common.inc.php file needs to be replaced with a different implementation that does not exhibit the bypass behavior. Here is an example of how the code can be modified:

// Original code
if (substr($password, 0, 0) === '') {
    // Bypass password check
}

// Modified code
if (empty($password)) {
    // Perform alternative password check
}

By making this change, the vulnerability can be mitigated until a proper upgrade can be performed.

Conclusion

The vulnerability in phpMyAdmin allows users without a password to bypass the login restrictions, potentially leading to unauthorized access to the application and the underlying database. It is crucial to upgrade to a fixed version of phpMyAdmin to mitigate this vulnerability. If immediate upgrading is not possible, implementing the provided workaround can provide temporary relief. For further assistance and support in vulnerability remediation, 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.

The vulnerability affects phpMyAdmin versions 4.0 before 4.0.10.20, 4.4.x, 4.6.x, and 4.7.0 prereleases.

The vulnerability allows users without a password to log in to the phpMyAdmin application, even if the administrator has explicitly disallowed such access. This can lead to unauthorized access to the database and potential data breaches.

To fix this vulnerability, it is recommended to upgrade to a fixed version of phpMyAdmin. The vulnerability has been addressed in versions 4.0.10.20, 4.7.0, 4.4.15.10, and 4.6.6.

Yes, a temporary workaround can be implemented by modifying the affected code. Details of the workaround can be found in the 'workaround' section of this report.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin/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

Fixed versions by release line

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

  • >= 4.0, < 4.0.10.20 4.0.10.20
    composer require phpmyadmin/phpmyadmin:4.0.10.20
  • >= 4.7.0-beta1, < 4.7.0 4.7.0
    composer require phpmyadmin/phpmyadmin:4.7.0

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