Malicious software downloads invade WordPress • The Register

WordPress bug resets admin password

by Dan Goodi, theregister.co.uk
August 12th 2009 1:29 AM

This story was updated to correct details of the bug. It allows attackers to reset passwords, but not take over accounts.

Developers of the widely used WordPress blogging software have released an update that fixes a vulnerability that let attackers reset the administrator password.

The bug in version 2.8.3 is trivial to exploit remotely using nothing more than a web browser and a specially manipulated link. Using the special URL, the old password is removed and a new one generated in its place with no confirmation required, according to this alert published on the Full-Disclosure mailing list.

The flaw lurks in some of the PHP code that fails to properly scrutinize user input when the password reset feature is invoked. Exploiting it is as easy is directing a web browser to a link that looks something like:

http://domain_name.tld/wp-login.php?action=rp&key[]=

According to WordPress documentation here, the bug has been fixed by changing a single line of code so the program checks to make sure the input supplied for the new password isn't an array. If it is, the user gets an error message and must try again. After this article was first published, version 2.8.4 was released.

That would appear to be the end of it, but security researchers Rafal Los and Mike Bailey wonder aloud here whether it would have made more sense to check instead whether the input is a string.

"Hasty coding?" he asks. "Why take the blacklist vs. whitelist approach?"

After this article was first published, WordPress documentation showed the suggestion from Los and Bailey was being formally adopted.

The bigger point he and other observers seem to make is that PHP is the coding equivalent of an everyman's jet pack. It allows him to quickly soar into the sky with a minimal amount of training but doesn't necessarily provide the means to check for buildings, planes or other hazards that may greet the user once he gets there.

Of course, all languages are only as good as the person using them. But it's worth posing such questions to anything that's standing between your website and the people out to get it.

Additional details and analysis from Sans and Heise here and here. ®

Original Page: http://www.theregister.co.uk/2009/08/12/wordpress_password_reset_bug/

Shared from Read It Later

Elyssa Durant, Ed.M. 

United States of America 

Forgive typos! iBLAME iPhone

Comments