Anyone can connect with any username but no password

Bug #281290 reported by Manatsawin Hanmongkolchai
268
This bug affects 2 people
Affects Status Importance Assigned to Milestone
phpMyAdmin
Fix Released
Undecided
Unassigned
phpmyadmin (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: phpmyadmin

The mysql project, as stated in http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

Two anonymous-user accounts are created, each with an empty username. The anonymous accounts have no password, so anyone can use them to connect to the MySQL server.

On Unix, both anonymous accounts are for connections from the local host. Connections must be made from the local host by specifying a hostname of localhost for one of the accounts, or the actual hostname or IP number for the other. These accounts have all privileges for the test database and for other databases with names that start with test_.

So, the mysql-server is secure, because it accept anonymous account login from localhost only but phpmyadmin is acting as proxy to mysql server so anyone can access the test database.

At least, I have found many real world servers running phpmyadmin at /phpmyadmin and I can access the account. A person from #ubuntu-th also can access the test database, which the host(also on #ubuntu-th) had installed Simple Machines Forum into and he can export smf_user from it.

Steps to reproduce:
1. Go to any phpmyadmin instance.
2. Type anything (but not existing user) into the username.
3. Login (don't enter anything as password)

Suggestions:
1. Remove the anonymous account when phpmyadmin is installed, and show notice message to the user. (preferred in the same way as "Please restart any running Firefoxes" message as it isn't blocking dpkg)
2. Disable this account login via phpmyadmin.
3. Inform user when install phpmyadmin of this bug.

I don't think this bug should fix in mysql because the localhost restriction is just fine.

description: updated
description: updated
Revision history for this message
papukaija (papukaija) wrote :

Same here on Intrepid.

Changed in phpmyadmin:
status: New → Confirmed
Revision history for this message
Michal Čihař (nijel) wrote :

Yes, this is true on all current phpMyAdmin versions. Only recently we by default disabled root without password.

But all these problems come from MySQL defaults, which I thing are simply wrong. On the other side when compared to root with no password, this one is less evil.

Revision history for this message
papukaija (papukaija) wrote :

This bug is a security vulnerability. Can somebody fix it for Jaunty?

Revision history for this message
papukaija (papukaija) wrote :

This bug seems to be fixed in Jaunty. I got this when trying to connect with a random username: "#1045 - Access denied for user 'fsdfdsd'@'localhost' (using password: NO)"

Changed in phpmyadmin (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
papukaija (papukaija) wrote :

Can someone test if this bug exists in the uptstream version of phpmuadmin?

Changed in phpmyadmin:
status: New → Incomplete
Revision history for this message
Michal Čihař (nijel) wrote :

Current upstream versions do not allow login without password by default.

Revision history for this message
papukaija (papukaija) wrote :

Setting this to invalid since I don't which release fixed the upstream bug.

Changed in phpmyadmin:
status: Incomplete → Invalid
Revision history for this message
Michal Čihař (nijel) wrote :

I think it was 3.2.0 release.

Revision history for this message
papukaija (papukaija) wrote :

Fixed in 3.2.0 release.

Changed in phpmyadmin:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.